From f57a3f9cde5f78c992a65e4825071e6fb3264798 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 11:13:02 +0200 Subject: [PATCH 01/36] Hack to remove build warning on MSVC 2010 Fixes LP #1700329 --- dtool/src/dtoolbase/dtoolbase_cc.h | 4 ++++ panda/src/express/pointerTo.h | 4 ++-- panda/src/express/pointerToBase.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index f4fb89015c..7ccca03e24 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -34,6 +34,7 @@ using namespace std; #define ALWAYS_INLINE inline #define TYPENAME typename #define CONSTEXPR constexpr +#define ALWAYS_INLINE_CONSTEXPR constexpr #define NOEXCEPT noexcept #define FINAL final #define OVERRIDE override @@ -231,6 +232,9 @@ template typename remove_reference::type &&move(T &&t) { // Fallbacks if features are not supported #ifndef CONSTEXPR # define CONSTEXPR INLINE +# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE +#else +# define ALWAYS_INLINE_CONSTEXPR ALWAYS_INLINE CONSTEXPR #endif #ifndef NOEXCEPT # define NOEXCEPT diff --git a/panda/src/express/pointerTo.h b/panda/src/express/pointerTo.h index 15dbcdefb0..62abdf8e57 100644 --- a/panda/src/express/pointerTo.h +++ b/panda/src/express/pointerTo.h @@ -70,7 +70,7 @@ class PointerTo : public PointerToBase { public: typedef TYPENAME PointerToBase::To To; PUBLISHED: - ALWAYS_INLINE CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR PointerTo() NOEXCEPT DEFAULT_CTOR; ALWAYS_INLINE PointerTo(To *ptr) NOEXCEPT; INLINE PointerTo(const PointerTo ©); @@ -133,7 +133,7 @@ class ConstPointerTo : public PointerToBase { public: typedef TYPENAME PointerToBase::To To; PUBLISHED: - ALWAYS_INLINE CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR ConstPointerTo() NOEXCEPT DEFAULT_CTOR; ALWAYS_INLINE ConstPointerTo(const To *ptr) NOEXCEPT; INLINE ConstPointerTo(const PointerTo ©); INLINE ConstPointerTo(const ConstPointerTo ©); diff --git a/panda/src/express/pointerToBase.h b/panda/src/express/pointerToBase.h index 4263312daa..7d5524f2b9 100644 --- a/panda/src/express/pointerToBase.h +++ b/panda/src/express/pointerToBase.h @@ -31,7 +31,7 @@ public: typedef T To; protected: - ALWAYS_INLINE CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR; + ALWAYS_INLINE_CONSTEXPR PointerToBase() NOEXCEPT DEFAULT_CTOR; INLINE PointerToBase(To *ptr); INLINE PointerToBase(const PointerToBase ©); INLINE ~PointerToBase(); From 48c811e112999b345346177b68185417857843a3 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 11:47:59 +0200 Subject: [PATCH 02/36] cull: remove GeomMunger stored on CullableObject --- panda/src/cull/cullBinBackToFront.cxx | 2 +- panda/src/cull/cullBinFixed.cxx | 2 +- panda/src/cull/cullBinFrontToBack.cxx | 2 +- panda/src/cull/cullBinStateSorted.cxx | 2 +- panda/src/cull/cullBinUnsorted.cxx | 2 +- panda/src/display/graphicsStateGuardian.cxx | 3 --- panda/src/display/graphicsStateGuardian.h | 4 +--- panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx | 4 +--- panda/src/dxgsg9/dxGraphicsStateGuardian9.h | 1 - panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 7 +++---- panda/src/glstuff/glGraphicsStateGuardian_src.h | 1 - panda/src/gobj/geom.cxx | 11 +++++------ panda/src/gobj/geom.h | 3 +-- panda/src/gsgbase/graphicsStateGuardianBase.h | 1 - panda/src/pgraph/cullableObject.I | 4 +--- panda/src/pgraph/cullableObject.cxx | 12 +++++------- panda/src/pgraph/cullableObject.h | 8 +++----- panda/src/pgraph/geomDrawCallbackData.cxx | 4 ++-- panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx | 3 +-- panda/src/tinydisplay/tinyGraphicsStateGuardian.h | 1 - 20 files changed, 28 insertions(+), 49 deletions(-) diff --git a/panda/src/cull/cullBinBackToFront.cxx b/panda/src/cull/cullBinBackToFront.cxx index 57168aa866..a1a7264af0 100644 --- a/panda/src/cull/cullBinBackToFront.cxx +++ b/panda/src/cull/cullBinBackToFront.cxx @@ -99,7 +99,7 @@ draw(bool force, Thread *current_thread) { data_reader.set_object(object->_munged_data); data_reader.check_array_readers(); geom_reader.set_object(object->_geom); - geom_reader.draw(_gsg, object->_munger, &data_reader, force); + geom_reader.draw(_gsg, &data_reader, force); } else { // It has a callback associated. object->draw_callback(_gsg, force, current_thread); diff --git a/panda/src/cull/cullBinFixed.cxx b/panda/src/cull/cullBinFixed.cxx index 6bbce5ed78..212bc4f320 100644 --- a/panda/src/cull/cullBinFixed.cxx +++ b/panda/src/cull/cullBinFixed.cxx @@ -85,7 +85,7 @@ draw(bool force, Thread *current_thread) { data_reader.set_object(object->_munged_data); data_reader.check_array_readers(); geom_reader.set_object(object->_geom); - geom_reader.draw(_gsg, object->_munger, &data_reader, force); + geom_reader.draw(_gsg, &data_reader, force); } else { // It has a callback associated. object->draw_callback(_gsg, force, current_thread); diff --git a/panda/src/cull/cullBinFrontToBack.cxx b/panda/src/cull/cullBinFrontToBack.cxx index a532fef811..0fb05a68b5 100644 --- a/panda/src/cull/cullBinFrontToBack.cxx +++ b/panda/src/cull/cullBinFrontToBack.cxx @@ -99,7 +99,7 @@ draw(bool force, Thread *current_thread) { data_reader.set_object(object->_munged_data); data_reader.check_array_readers(); geom_reader.set_object(object->_geom); - geom_reader.draw(_gsg, object->_munger, &data_reader, force); + geom_reader.draw(_gsg, &data_reader, force); } else { // It has a callback associated. object->draw_callback(_gsg, force, current_thread); diff --git a/panda/src/cull/cullBinStateSorted.cxx b/panda/src/cull/cullBinStateSorted.cxx index 07f3f9c9a3..04890af48c 100644 --- a/panda/src/cull/cullBinStateSorted.cxx +++ b/panda/src/cull/cullBinStateSorted.cxx @@ -84,7 +84,7 @@ draw(bool force, Thread *current_thread) { data_reader.set_object(object->_munged_data); data_reader.check_array_readers(); geom_reader.set_object(object->_geom); - geom_reader.draw(_gsg, object->_munger, &data_reader, force); + geom_reader.draw(_gsg, &data_reader, force); } else { // It has a callback associated. object->draw_callback(_gsg, force, current_thread); diff --git a/panda/src/cull/cullBinUnsorted.cxx b/panda/src/cull/cullBinUnsorted.cxx index c9a68401b6..4ef8c35ae6 100644 --- a/panda/src/cull/cullBinUnsorted.cxx +++ b/panda/src/cull/cullBinUnsorted.cxx @@ -69,7 +69,7 @@ draw(bool force, Thread *current_thread) { data_reader.set_object(object->_munged_data); data_reader.check_array_readers(); geom_reader.set_object(object->_geom); - geom_reader.draw(_gsg, object->_munger, &data_reader, force); + geom_reader.draw(_gsg, &data_reader, force); } else { // It has a callback associated. object->draw_callback(_gsg, force, current_thread); diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 70dfcc80ac..05126797a1 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -2263,10 +2263,8 @@ finish_decal() { */ bool GraphicsStateGuardian:: begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force) { - _munger = munger; _data_reader = data_reader; // Always draw if we have a shader, since the shader might use a different @@ -2337,7 +2335,6 @@ draw_points(const GeomPrimitivePipelineReader *, bool) { */ void GraphicsStateGuardian:: end_draw_primitives() { - _munger = NULL; _data_reader = NULL; } diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index 22f4f07fec..305a8d62e0 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -367,7 +367,6 @@ public: virtual void finish_decal(); virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force); virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, @@ -496,9 +495,8 @@ protected: CPT(ShaderAttrib) _state_shader; CPT(ShaderAttrib) _target_shader; - // These are set by begin_draw_primitives(), and are only valid between + // This is set by begin_draw_primitives(), and are only valid between // begin_draw_primitives() and end_draw_primitives(). - CPT(GeomMunger) _munger; const GeomVertexDataPipelineReader *_data_reader; unsigned int _color_write_mask; diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 2f47afe6cf..4ad0250ee3 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -1141,11 +1141,9 @@ end_frame(Thread *current_thread) { */ bool DXGraphicsStateGuardian9:: begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force) { - if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, munger, - data_reader, force)) { + if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, data_reader, force)) { return false; } nassertr(_data_reader != (GeomVertexDataPipelineReader *)NULL, false); diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h index 21bb0d7265..fa31ac12fd 100644 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.h +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.h @@ -106,7 +106,6 @@ public: virtual void end_frame(Thread *current_thread); virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force); virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 233385237e..d8b10292ec 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -3934,7 +3934,6 @@ end_frame(Thread *current_thread) { */ bool CLP(GraphicsStateGuardian):: begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force) { #ifndef NDEBUG @@ -3953,7 +3952,7 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, } #endif - if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, munger, data_reader, force)) { + if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, data_reader, force)) { return false; } nassertr(_data_reader != (GeomVertexDataPipelineReader *)NULL, false); @@ -4018,10 +4017,10 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, GeomContext *gc = geom_reader->prepare_now(get_prepared_objects(), this); nassertr(gc != (GeomContext *)NULL, false); CLP(GeomContext) *ggc = DCAST(CLP(GeomContext), gc); - const CLP(GeomMunger) *gmunger = DCAST(CLP(GeomMunger), _munger); + //const CLP(GeomMunger) *gmunger = DCAST(CLP(GeomMunger), _munger); UpdateSeq modified = max(geom_reader->get_modified(), _data_reader->get_modified()); - if (ggc->get_display_list(_geom_display_list, gmunger, modified)) { + if (ggc->get_display_list(_geom_display_list, nullptr, modified)) { // If it hasn't been modified, just play the display list again. if (GLCAT.is_spam()) { GLCAT.spam() diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.h b/panda/src/glstuff/glGraphicsStateGuardian_src.h index 5f7f382246..e4da7cade1 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.h +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.h @@ -284,7 +284,6 @@ public: virtual void end_frame(Thread *current_thread); virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force); virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index 2b16a915cd..cf9a3a49b1 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -1211,14 +1211,13 @@ prepare_now(PreparedGraphicsObjects *prepared_objects, * is passed true, it will wait for the data to become resident if necessary. */ bool Geom:: -draw(GraphicsStateGuardianBase *gsg, const GeomMunger *munger, - const GeomVertexData *vertex_data, bool force, - Thread *current_thread) const { +draw(GraphicsStateGuardianBase *gsg, const GeomVertexData *vertex_data, + bool force, Thread *current_thread) const { GeomPipelineReader geom_reader(this, current_thread); GeomVertexDataPipelineReader data_reader(vertex_data, current_thread); data_reader.check_array_readers(); - return geom_reader.draw(gsg, munger, &data_reader, force); + return geom_reader.draw(gsg, &data_reader, force); } /** @@ -1749,10 +1748,10 @@ check_valid(const GeomVertexDataPipelineReader *data_reader) const { * The implementation of Geom::draw(). */ bool GeomPipelineReader:: -draw(GraphicsStateGuardianBase *gsg, const GeomMunger *munger, +draw(GraphicsStateGuardianBase *gsg, const GeomVertexDataPipelineReader *data_reader, bool force) const { PStatTimer timer(Geom::_draw_primitive_setup_pcollector); - bool all_ok = gsg->begin_draw_primitives(this, munger, data_reader, force); + bool all_ok = gsg->begin_draw_primitives(this, data_reader, force); if (all_ok) { Geom::Primitives::const_iterator pi; for (pi = _cdata->_primitives.begin(); diff --git a/panda/src/gobj/geom.h b/panda/src/gobj/geom.h index a1408878d8..0c61e5ef84 100644 --- a/panda/src/gobj/geom.h +++ b/panda/src/gobj/geom.h @@ -153,7 +153,6 @@ PUBLISHED: public: bool draw(GraphicsStateGuardianBase *gsg, - const GeomMunger *munger, const GeomVertexData *vertex_data, bool force, Thread *current_thread) const; @@ -429,7 +428,7 @@ public: INLINE GeomContext *prepare_now(PreparedGraphicsObjects *prepared_objects, GraphicsStateGuardianBase *gsg) const; - bool draw(GraphicsStateGuardianBase *gsg, const GeomMunger *munger, + bool draw(GraphicsStateGuardianBase *gsg, const GeomVertexDataPipelineReader *data_reader, bool force) const; diff --git a/panda/src/gsgbase/graphicsStateGuardianBase.h b/panda/src/gsgbase/graphicsStateGuardianBase.h index c45f36aca0..361407ec6c 100644 --- a/panda/src/gsgbase/graphicsStateGuardianBase.h +++ b/panda/src/gsgbase/graphicsStateGuardianBase.h @@ -198,7 +198,6 @@ public: // friends of this class. virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force)=0; virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, bool force)=0; diff --git a/panda/src/pgraph/cullableObject.I b/panda/src/pgraph/cullableObject.I index 2aae972296..e93e826a58 100644 --- a/panda/src/pgraph/cullableObject.I +++ b/panda/src/pgraph/cullableObject.I @@ -43,7 +43,6 @@ CullableObject(CPT(Geom) geom, CPT(RenderState) state, INLINE CullableObject:: CullableObject(const CullableObject ©) : _geom(copy._geom), - _munger(copy._munger), _munged_data(copy._munged_data), _state(copy._state), _internal_transform(copy._internal_transform) @@ -59,7 +58,6 @@ CullableObject(const CullableObject ©) : INLINE void CullableObject:: operator = (const CullableObject ©) { _geom = copy._geom; - _munger = copy._munger; _munged_data = copy._munged_data; _state = copy._state; _internal_transform = copy._internal_transform; @@ -132,7 +130,7 @@ flush_level() { */ INLINE void CullableObject:: draw_inline(GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread) { - _geom->draw(gsg, _munger, _munged_data, force, current_thread); + _geom->draw(gsg, _munged_data, force, current_thread); } /** diff --git a/panda/src/pgraph/cullableObject.cxx b/panda/src/pgraph/cullableObject.cxx index 0bd7a0fe5f..3d18dc6748 100644 --- a/panda/src/pgraph/cullableObject.cxx +++ b/panda/src/pgraph/cullableObject.cxx @@ -50,15 +50,13 @@ TypeHandle CullableObject::_type_handle; * have to block while the vertex data is paged in. */ bool CullableObject:: -munge_geom(GraphicsStateGuardianBase *gsg, - GeomMunger *munger, const CullTraverser *traverser, - bool force) { - nassertr(munger != (GeomMunger *)NULL, false); +munge_geom(GraphicsStateGuardianBase *gsg, GeomMunger *munger, + const CullTraverser *traverser, bool force) { + nassertr(munger != nullptr, false); + Thread *current_thread = traverser->get_current_thread(); PStatTimer timer(_munge_geom_pcollector, current_thread); - if (_geom != (Geom *)NULL) { - _munger = munger; - + if (_geom != nullptr) { GraphicsStateGuardianBase *gsg = traverser->get_gsg(); int gsg_bits = gsg->get_supported_geom_rendering(); if (!hardware_point_sprites) { diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index aa4a3af3c2..1415052770 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/panda/src/pgraph/cullableObject.h @@ -18,7 +18,6 @@ #include "geom.h" #include "geomVertexData.h" -#include "geomMunger.h" #include "renderState.h" #include "transformState.h" #include "pointerTo.h" @@ -34,6 +33,7 @@ #include "geomDrawCallbackData.h" class CullTraverser; +class GeomMunger; /** * The smallest atom of cull. This is normally just a Geom and its associated @@ -52,9 +52,8 @@ public: INLINE CullableObject(const CullableObject ©); INLINE void operator = (const CullableObject ©); - bool munge_geom(GraphicsStateGuardianBase *gsg, - GeomMunger *munger, const CullTraverser *traverser, - bool force); + bool munge_geom(GraphicsStateGuardianBase *gsg, GeomMunger *munger, + const CullTraverser *traverser, bool force); INLINE void draw(GraphicsStateGuardianBase *gsg, bool force, Thread *current_thread); @@ -75,7 +74,6 @@ public: public: CPT(Geom) _geom; - PT(GeomMunger) _munger; CPT(GeomVertexData) _munged_data; CPT(RenderState) _state; CPT(TransformState) _internal_transform; diff --git a/panda/src/pgraph/geomDrawCallbackData.cxx b/panda/src/pgraph/geomDrawCallbackData.cxx index 283fe9711c..1b6dc76082 100644 --- a/panda/src/pgraph/geomDrawCallbackData.cxx +++ b/panda/src/pgraph/geomDrawCallbackData.cxx @@ -39,13 +39,13 @@ output(ostream &out) const { void GeomDrawCallbackData:: upcall() { // Go ahead and draw the object, if we have one. - if (_obj->_geom != (Geom *)NULL) { + if (_obj->_geom != nullptr) { if (_lost_state) { // Tell the GSG to forget its state. _gsg->clear_state_and_transform(); } - _obj->_geom->draw(_gsg, _obj->_munger, _obj->_munged_data, _force, + _obj->_geom->draw(_gsg, _obj->_munged_data, _force, Thread::get_current_thread()); } } diff --git a/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx b/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx index f757b35a22..9da9aa0fea 100644 --- a/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx +++ b/panda/src/tinydisplay/tinyGraphicsStateGuardian.cxx @@ -470,7 +470,6 @@ end_frame(Thread *current_thread) { */ bool TinyGraphicsStateGuardian:: begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force) { #ifndef NDEBUG @@ -479,7 +478,7 @@ begin_draw_primitives(const GeomPipelineReader *geom_reader, } #endif // NDEBUG - if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, munger, data_reader, force)) { + if (!GraphicsStateGuardian::begin_draw_primitives(geom_reader, data_reader, force)) { return false; } nassertr(_data_reader != (GeomVertexDataPipelineReader *)NULL, false); diff --git a/panda/src/tinydisplay/tinyGraphicsStateGuardian.h b/panda/src/tinydisplay/tinyGraphicsStateGuardian.h index 65e01d7fbc..c7aae852cd 100644 --- a/panda/src/tinydisplay/tinyGraphicsStateGuardian.h +++ b/panda/src/tinydisplay/tinyGraphicsStateGuardian.h @@ -63,7 +63,6 @@ public: virtual void end_frame(Thread *current_thread); virtual bool begin_draw_primitives(const GeomPipelineReader *geom_reader, - const GeomMunger *munger, const GeomVertexDataPipelineReader *data_reader, bool force); virtual bool draw_triangles(const GeomPrimitivePipelineReader *reader, From fa1c480508855a422b968a438606eaaf71b254e7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 12:56:23 +0200 Subject: [PATCH 03/36] general: clean up use of override keyword --- dtool/src/dtoolbase/dtoolbase_cc.h | 8 ----- panda/src/egg/eggLine.h | 10 +++--- panda/src/egg/eggNurbsCurve.h | 8 ++--- panda/src/egg/eggNurbsSurface.h | 10 +++--- panda/src/egg/eggPatch.h | 8 ++--- panda/src/egg/eggPoint.h | 10 +++--- panda/src/egg/eggPolygon.h | 10 +++--- panda/src/egg/eggTriangleFan.h | 14 ++++----- panda/src/egg/eggTriangleStrip.h | 12 +++---- panda/src/glstuff/glCgShaderContext_src.I | 34 -------------------- panda/src/glstuff/glCgShaderContext_src.cxx | 14 +++++++++ panda/src/glstuff/glCgShaderContext_src.h | 26 +++++++-------- panda/src/glstuff/glShaderContext_src.I | 35 --------------------- panda/src/glstuff/glShaderContext_src.cxx | 22 ++++++++++--- panda/src/glstuff/glShaderContext_src.h | 32 ++++++++++--------- 15 files changed, 104 insertions(+), 149 deletions(-) diff --git a/dtool/src/dtoolbase/dtoolbase_cc.h b/dtool/src/dtoolbase/dtoolbase_cc.h index 7ccca03e24..eb84f1fccd 100644 --- a/dtool/src/dtoolbase/dtoolbase_cc.h +++ b/dtool/src/dtoolbase/dtoolbase_cc.h @@ -37,7 +37,6 @@ using namespace std; #define ALWAYS_INLINE_CONSTEXPR constexpr #define NOEXCEPT noexcept #define FINAL final -#define OVERRIDE override #define MOVE(x) x #define DEFAULT_CTOR = default #define DEFAULT_DTOR = default @@ -167,7 +166,6 @@ template typename remove_reference::type &&move(T &&t) { # endif # if __has_extension(cxx_override_control) && (__cplusplus >= 201103L) # define FINAL final -# define OVERRIDE override # endif # if __has_extension(cxx_defaulted_functions) # define DEFAULT_CTOR = default @@ -198,7 +196,6 @@ template typename remove_reference::type &&move(T &&t) { // Starting at GCC 4.7 # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) # define FINAL final -# define OVERRIDE override # endif // GCC defines several macros which we can query. List of all supported @@ -212,11 +209,9 @@ template typename remove_reference::type &&move(T &&t) { # define NOEXCEPT noexcept # define USE_MOVE_SEMANTICS # define FINAL final -# define OVERRIDE override # define MOVE(x) move(x) #elif defined(_MSC_VER) && _MSC_VER >= 1600 // Visual Studio 2010 # define NOEXCEPT throw() -# define OVERRIDE override # define USE_MOVE_SEMANTICS # define FINAL sealed # define MOVE(x) move(x) @@ -245,9 +240,6 @@ template typename remove_reference::type &&move(T &&t) { #ifndef FINAL # define FINAL #endif -#ifndef OVERRIDE -# define OVERRIDE -#endif #ifndef DEFAULT_CTOR # define DEFAULT_CTOR {} #endif diff --git a/panda/src/egg/eggLine.h b/panda/src/egg/eggLine.h index 72ea411cdc..27ee84a785 100644 --- a/panda/src/egg/eggLine.h +++ b/panda/src/egg/eggLine.h @@ -29,9 +29,9 @@ PUBLISHED: INLINE EggLine &operator = (const EggLine ©); virtual ~EggLine(); - virtual EggLine *make_copy() const OVERRIDE; + virtual EggLine *make_copy() const override; - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; INLINE bool has_thick() const; INLINE double get_thick() const; @@ -39,7 +39,7 @@ PUBLISHED: INLINE void clear_thick(); protected: - virtual int get_num_lead_vertices() const OVERRIDE; + virtual int get_num_lead_vertices() const override; private: double _thick; @@ -54,10 +54,10 @@ public: register_type(_type_handle, "EggLine", EggCompositePrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggNurbsCurve.h b/panda/src/egg/eggNurbsCurve.h index 4225549736..bcd6f1de0c 100644 --- a/panda/src/egg/eggNurbsCurve.h +++ b/panda/src/egg/eggNurbsCurve.h @@ -29,7 +29,7 @@ PUBLISHED: INLINE EggNurbsCurve(const EggNurbsCurve ©); INLINE EggNurbsCurve &operator = (const EggNurbsCurve ©); - virtual EggNurbsCurve *make_copy() const OVERRIDE; + virtual EggNurbsCurve *make_copy() const override; void setup(int order, int num_knots); @@ -50,7 +50,7 @@ PUBLISHED: INLINE double get_knot(int k) const; MAKE_SEQ(get_knots, get_num_knots, get_knot); - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; MAKE_PROPERTY(order, get_order, set_order); MAKE_PROPERTY(degree, get_degree); @@ -72,10 +72,10 @@ public: register_type(_type_handle, "EggNurbsCurve", EggCurve::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggNurbsSurface.h b/panda/src/egg/eggNurbsSurface.h index 83900282f0..bc3d752307 100644 --- a/panda/src/egg/eggNurbsSurface.h +++ b/panda/src/egg/eggNurbsSurface.h @@ -36,7 +36,7 @@ PUBLISHED: INLINE EggNurbsSurface(const EggNurbsSurface ©); INLINE EggNurbsSurface &operator = (const EggNurbsSurface ©); - virtual EggNurbsSurface *make_copy() const OVERRIDE; + virtual EggNurbsSurface *make_copy() const override; void setup(int u_order, int v_order, int num_u_knots, int num_v_knots); @@ -75,14 +75,14 @@ PUBLISHED: MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot); INLINE EggVertex *get_cv(int ui, int vi) const; - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; public: Curves _curves_on_surface; Trims _trims; protected: - virtual void r_apply_texmats(EggTextureCollection &textures) OVERRIDE; + virtual void r_apply_texmats(EggTextureCollection &textures) override; private: typedef vector_double Knots; @@ -101,10 +101,10 @@ public: register_type(_type_handle, "EggNurbsSurface", EggSurface::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggPatch.h b/panda/src/egg/eggPatch.h index 4358149131..9b31d6e91f 100644 --- a/panda/src/egg/eggPatch.h +++ b/panda/src/egg/eggPatch.h @@ -28,9 +28,9 @@ PUBLISHED: INLINE EggPatch(const EggPatch ©); INLINE EggPatch &operator = (const EggPatch ©); - virtual EggPatch *make_copy() const OVERRIDE; + virtual EggPatch *make_copy() const override; - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; public: static TypeHandle get_class_type() { @@ -41,10 +41,10 @@ public: register_type(_type_handle, "EggPatch", EggPrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggPoint.h b/panda/src/egg/eggPoint.h index 93ed683133..994727e32e 100644 --- a/panda/src/egg/eggPoint.h +++ b/panda/src/egg/eggPoint.h @@ -28,7 +28,7 @@ PUBLISHED: INLINE EggPoint(const EggPoint ©); INLINE EggPoint &operator = (const EggPoint ©); - virtual EggPoint *make_copy() const OVERRIDE; + virtual EggPoint *make_copy() const override; INLINE bool has_thick() const; INLINE double get_thick() const; @@ -40,9 +40,9 @@ PUBLISHED: INLINE void set_perspective(bool perspective); INLINE void clear_perspective(); - virtual bool cleanup() OVERRIDE; + virtual bool cleanup() override; - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; private: enum Flags { @@ -64,10 +64,10 @@ public: register_type(_type_handle, "EggPoint", EggPrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggPolygon.h b/panda/src/egg/eggPolygon.h index 5d25c554be..aacd677c13 100644 --- a/panda/src/egg/eggPolygon.h +++ b/panda/src/egg/eggPolygon.h @@ -27,9 +27,9 @@ PUBLISHED: INLINE EggPolygon(const EggPolygon ©); INLINE EggPolygon &operator = (const EggPolygon ©); - virtual EggPolygon *make_copy() const OVERRIDE; + virtual EggPolygon *make_copy() const override; - virtual bool cleanup() OVERRIDE; + virtual bool cleanup() override; bool calculate_normal(LNormald &result, CoordinateSystem cs = CS_default) const; bool is_planar() const; @@ -39,7 +39,7 @@ PUBLISHED: INLINE bool triangulate_into(EggGroupNode *container, bool convex_also) const; PT(EggPolygon) triangulate_in_place(bool convex_also); - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; private: bool decomp_concave(EggGroupNode *container, int asum, int x, int y) const; @@ -55,10 +55,10 @@ public: register_type(_type_handle, "EggPolygon", EggPrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggTriangleFan.h b/panda/src/egg/eggTriangleFan.h index f2ca8e32b5..31c8a9e4a4 100644 --- a/panda/src/egg/eggTriangleFan.h +++ b/panda/src/egg/eggTriangleFan.h @@ -29,14 +29,14 @@ PUBLISHED: INLINE EggTriangleFan &operator = (const EggTriangleFan ©); virtual ~EggTriangleFan(); - virtual EggTriangleFan *make_copy() const OVERRIDE; + virtual EggTriangleFan *make_copy() const override; - virtual void write(ostream &out, int indent_level) const OVERRIDE; - virtual void apply_first_attribute() OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; + virtual void apply_first_attribute() override; protected: - virtual int get_num_lead_vertices() const OVERRIDE; - virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE; + virtual int get_num_lead_vertices() const override; + virtual bool do_triangulate(EggGroupNode *container) const override; public: static TypeHandle get_class_type() { @@ -47,10 +47,10 @@ public: register_type(_type_handle, "EggTriangleFan", EggCompositePrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/egg/eggTriangleStrip.h b/panda/src/egg/eggTriangleStrip.h index a84d0cd751..e74f248c47 100644 --- a/panda/src/egg/eggTriangleStrip.h +++ b/panda/src/egg/eggTriangleStrip.h @@ -29,13 +29,13 @@ PUBLISHED: INLINE EggTriangleStrip &operator = (const EggTriangleStrip ©); virtual ~EggTriangleStrip(); - virtual EggTriangleStrip *make_copy() const OVERRIDE; + virtual EggTriangleStrip *make_copy() const override; - virtual void write(ostream &out, int indent_level) const OVERRIDE; + virtual void write(ostream &out, int indent_level) const override; protected: - virtual int get_num_lead_vertices() const OVERRIDE; - virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE; + virtual int get_num_lead_vertices() const override; + virtual bool do_triangulate(EggGroupNode *container) const override; public: static TypeHandle get_class_type() { @@ -46,10 +46,10 @@ public: register_type(_type_handle, "EggTriangleStrip", EggCompositePrimitive::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE { + virtual TypeHandle force_init_type() override { init_type(); return get_class_type(); } diff --git a/panda/src/glstuff/glCgShaderContext_src.I b/panda/src/glstuff/glCgShaderContext_src.I index b2c176f7d1..08c947f0fb 100644 --- a/panda/src/glstuff/glCgShaderContext_src.I +++ b/panda/src/glstuff/glCgShaderContext_src.I @@ -10,37 +10,3 @@ * @author rdb * @date 2014-06-27 */ - -#ifndef OPENGLES_1 - -/** - * Returns true if the shader is "valid", ie, if the compilation was - * successful. The compilation could fail if there is a syntax error in the - * shader, or if the current video card isn't shader-capable, or if no shader - * languages are compiled into panda. - */ -INLINE bool CLP(CgShaderContext):: -valid() { - if (_shader->get_error_flag()) return false; - if (_shader->get_language() != Shader::SL_Cg) return false; - return (_cg_program != 0); -} - -/** - * Returns true if the shader may need to access standard vertex attributes as - * passed by glVertexPointer and the like. - */ -INLINE bool CLP(CgShaderContext):: -uses_standard_vertex_arrays() { - return false; -} - -/** - * Always true, for now. - */ -INLINE bool CLP(CgShaderContext):: -uses_custom_vertex_arrays() { - return true; -} - -#endif // OPENGLES_1 diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index d8f7231a34..9f6e242968 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -357,6 +357,20 @@ release_resources() { _glgsg->report_my_gl_errors(); } +/** + * Returns true if the shader is "valid", ie, if the compilation was + * successful. The compilation could fail if there is a syntax error in the + * shader, or if the current video card isn't shader-capable, or if no shader + * languages are compiled into panda. + */ +bool CLP(CgShaderContext):: +valid() { + if (_shader == nullptr || _shader->get_error_flag()) { + return false; + } + return (_cg_program != 0); +} + /** * This function is to be called to enable a new shader. It also initializes * all of the shader's input parameters. diff --git a/panda/src/glstuff/glCgShaderContext_src.h b/panda/src/glstuff/glCgShaderContext_src.h index 49d451d442..d5bc721e61 100644 --- a/panda/src/glstuff/glCgShaderContext_src.h +++ b/panda/src/glstuff/glCgShaderContext_src.h @@ -33,25 +33,25 @@ public: ~CLP(CgShaderContext)(); ALLOC_DELETED_CHAIN(CLP(CgShaderContext)); - INLINE bool valid(void); - void bind() OVERRIDE; - void unbind() OVERRIDE; + bool valid(void) override; + void bind() override; + void unbind() override; void set_state_and_transform(const RenderState *state, const TransformState *modelview_transform, const TransformState *camera_transform, - const TransformState *projection_transform) OVERRIDE; + const TransformState *projection_transform) override; - void issue_parameters(int altered) OVERRIDE; + void issue_parameters(int altered) override; void update_transform_table(const TransformTable *table); void update_slider_table(const SliderTable *table); - void disable_shader_vertex_arrays() OVERRIDE; - bool update_shader_vertex_arrays(ShaderContext *prev, bool force) OVERRIDE; - void disable_shader_texture_bindings() OVERRIDE; - void update_shader_texture_bindings(ShaderContext *prev) OVERRIDE; + void disable_shader_vertex_arrays() override; + bool update_shader_vertex_arrays(ShaderContext *prev, bool force) override; + void disable_shader_texture_bindings() override; + void update_shader_texture_bindings(ShaderContext *prev) override; - INLINE bool uses_standard_vertex_arrays(void); - INLINE bool uses_custom_vertex_arrays(void); + bool uses_standard_vertex_arrays(void) override { return false; } + bool uses_custom_vertex_arrays(void) override { return true; } // Special values for location to indicate conventional attrib slots. enum ConventionalAttrib { @@ -95,10 +95,10 @@ public: register_type(_type_handle, CLASSPREFIX_QUOTED "CgShaderContext", ShaderContext::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE {init_type(); return get_class_type();} + virtual TypeHandle force_init_type() override {init_type(); return get_class_type();} private: static TypeHandle _type_handle; diff --git a/panda/src/glstuff/glShaderContext_src.I b/panda/src/glstuff/glShaderContext_src.I index 00b8460ba8..aa14237510 100644 --- a/panda/src/glstuff/glShaderContext_src.I +++ b/panda/src/glstuff/glShaderContext_src.I @@ -10,38 +10,3 @@ * @author jyelon * @date 2005-09-01 */ - -/** - * Returns true if the shader is "valid", ie, if the compilation was - * successful. The compilation could fail if there is a syntax error in the - * shader, or if the current video card isn't shader-capable, or if no shader - * languages are compiled into panda. - */ -INLINE bool CLP(ShaderContext):: -valid() { - if (_shader->get_error_flag()) return false; - if (_shader->get_language() != Shader::SL_GLSL) { - return false; - } - if (_glsl_program != 0) { - return true; - } - return false; -} - -/** - * Returns true if the shader may need to access standard vertex attributes as - * passed by glVertexPointer and the like. - */ -INLINE bool CLP(ShaderContext):: -uses_standard_vertex_arrays() { - return _uses_standard_vertex_arrays; -} - -/** - * Always true, for now. - */ -INLINE bool CLP(ShaderContext):: -uses_custom_vertex_arrays() { - return true; -} diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index d81d86bfff..1afa11d2b8 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1821,6 +1821,20 @@ release_resources() { _glgsg->report_my_gl_errors(); } +/** + * Returns true if the shader is "valid", ie, if the compilation was + * successful. The compilation could fail if there is a syntax error in the + * shader, or if the current video card isn't shader-capable, or if no shader + * languages are compiled into panda. + */ +bool CLP(ShaderContext):: +valid() { + if (_shader->get_error_flag()) { + return false; + } + return (_glsl_program != 0); +} + /** * This function is to be called to enable a new shader. It also initializes * all of the shader's input parameters. @@ -2177,7 +2191,7 @@ update_slider_table(const SliderTable *table) { */ void CLP(ShaderContext):: disable_shader_vertex_arrays() { - if (!valid()) { + if (_glsl_program == 0) { return; } @@ -2200,7 +2214,7 @@ disable_shader_vertex_arrays() { */ bool CLP(ShaderContext):: update_shader_vertex_arrays(ShaderContext *prev, bool force) { - if (!valid()) { + if (_glsl_program == 0) { return true; } @@ -2373,7 +2387,7 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) { */ void CLP(ShaderContext):: disable_shader_texture_bindings() { - if (!valid()) { + if (_glsl_program == 0) { return; } @@ -2473,7 +2487,7 @@ void CLP(ShaderContext):: update_shader_texture_bindings(ShaderContext *prev) { // if (prev) { prev->disable_shader_texture_bindings(); } - if (!valid()) { + if (_glsl_program == 0) { return; } diff --git a/panda/src/glstuff/glShaderContext_src.h b/panda/src/glstuff/glShaderContext_src.h index 97c9b5940c..9ecfe9ed39 100644 --- a/panda/src/glstuff/glShaderContext_src.h +++ b/panda/src/glstuff/glShaderContext_src.h @@ -40,26 +40,30 @@ public: void reflect_uniform(int i, char *name_buffer, GLsizei name_buflen); bool get_sampler_texture_type(int &out, GLenum param_type); - INLINE bool valid(void); - void bind() OVERRIDE; - void unbind() OVERRIDE; + bool valid(void) override; + void bind() override; + void unbind() override; void set_state_and_transform(const RenderState *state, const TransformState *modelview_transform, const TransformState *camera_transform, - const TransformState *projection_transform) OVERRIDE; + const TransformState *projection_transform) override; - void issue_parameters(int altered) OVERRIDE; + void issue_parameters(int altered) override; void update_transform_table(const TransformTable *table); void update_slider_table(const SliderTable *table); - void disable_shader_vertex_arrays() OVERRIDE; - bool update_shader_vertex_arrays(ShaderContext *prev, bool force) OVERRIDE; - void disable_shader_texture_bindings() OVERRIDE; - void update_shader_texture_bindings(ShaderContext *prev) OVERRIDE; - void update_shader_buffer_bindings(ShaderContext *prev) OVERRIDE; + void disable_shader_vertex_arrays() override; + bool update_shader_vertex_arrays(ShaderContext *prev, bool force) override; + void disable_shader_texture_bindings() override; + void update_shader_texture_bindings(ShaderContext *prev) override; + void update_shader_buffer_bindings(ShaderContext *prev) override; - INLINE bool uses_standard_vertex_arrays(void); - INLINE bool uses_custom_vertex_arrays(void); + bool uses_standard_vertex_arrays(void) override { + return _uses_standard_vertex_arrays; + } + bool uses_custom_vertex_arrays(void) override { + return true; + } private: bool _validated; @@ -128,10 +132,10 @@ public: register_type(_type_handle, CLASSPREFIX_QUOTED "ShaderContext", ShaderContext::get_class_type()); } - virtual TypeHandle get_type() const OVERRIDE { + virtual TypeHandle get_type() const override { return get_class_type(); } - virtual TypeHandle force_init_type() OVERRIDE {init_type(); return get_class_type();} + virtual TypeHandle force_init_type() override {init_type(); return get_class_type();} private: static TypeHandle _type_handle; From 69eab74b779879524b1adc09299a6a92d931050c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 13:22:59 +0200 Subject: [PATCH 04/36] makepanda: changes to support static building better Fixes LP 1081784 --- makepanda/makepanda.py | 21 +++++++++++++++++++-- makepanda/makepandacore.py | 11 +++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 4c06fc4706..b707623ed4 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1515,7 +1515,9 @@ def CompileLib(lib, obj, opts): if HasTargetArch(): cmd += " /MACHINE:" + GetTargetArch().upper() cmd += ' /OUT:' + BracketNameWithQuotes(lib) - for x in obj: cmd += ' ' + BracketNameWithQuotes(x) + for x in obj: + if not x.endswith('.lib'): + cmd += ' ' + BracketNameWithQuotes(x) oscmd(cmd) else: # Choose Intel linker; from Jean-Claude @@ -1568,6 +1570,21 @@ def CompileLink(dll, obj, opts): cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO " cmd += ' /OUT:' + BracketNameWithQuotes(dll) + if not PkgSkip("PYTHON"): + # If we're building without Python, don't pick it up implicitly. + if "PYTHON" not in opts: + pythonv = SDK["PYTHONVERSION"].replace('.', '') + if optlevel <= 2: + cmd += ' /NOD:{}d.lib'.format(pythonv) + else: + cmd += ' /NOD:{}.lib'.format(pythonv) + + # Yes, we know we are importing "locally defined symbols". + for x in obj: + if x.endswith('libp3pystub.lib'): + cmd += ' /ignore:4049,4217' + break + # Set the subsystem. Specify that we want to target Windows XP. subsystem = GetValueOption(opts, "SUBSYSTEM:") or "CONSOLE" cmd += " /SUBSYSTEM:" + subsystem @@ -2691,7 +2708,7 @@ if GetTarget() == 'windows': import os bindir = os.path.join(os.path.dirname(__file__), '..', 'bin') -if os.path.isfile(os.path.join(bindir, 'libpanda.dll')): +if os.path.isdir(bindir): if not os.environ.get('PATH'): os.environ['PATH'] = bindir else: diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 0999b5a42f..9f42b92580 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -3157,6 +3157,17 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None for d in CxxCalcDependencies(fullinput, ipath, []): t.deps[d] = 1 + # If we are linking statically, add the source DLL's dynamic dependencies. + if GetLinkAllStatic() and ORIG_EXT[fullinput] == '.lib' and fullinput in TARGET_TABLE: + tdep = TARGET_TABLE[fullinput] + for y in tdep.inputs: + if ORIG_EXT[y] == '.lib': + t.inputs.append(y) + + for opt, _ in LIBNAMES + LIBDIRECTORIES + FRAMEWORKDIRECTORIES: + if opt in tdep.opts and opt not in t.opts: + t.opts.append(opt) + if x.endswith(".in"): # Mark the _igate.cxx file as a dependency also. outbase = os.path.basename(x)[:-3] From 2b537d2263d312672fe4a380fb6f49bda641cd48 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 3 Jul 2017 22:27:37 +0200 Subject: [PATCH 05/36] Use XDG basedir spec for model-cache-dir (now $XDG_CACHE_HOME/panda3d which is usually $HOME/.cache/panda3d) User appdata directory on posix is now $XDG_DATA_HOME (usually $HOME/.local/share). Common appdata dir is /usr/share (or /usr/local/share on FreeBSD) --- dtool/src/dtoolutil/executionEnvironment.cxx | 16 ++++++++++++++++ dtool/src/dtoolutil/filename.cxx | 15 +++++++++++---- makepanda/config.in | 2 +- makepanda/makepanda.py | 4 ++-- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx index cf7ecac50e..ad782b521e 100644 --- a/dtool/src/dtoolutil/executionEnvironment.cxx +++ b/dtool/src/dtoolutil/executionEnvironment.cxx @@ -341,6 +341,22 @@ ns_get_environment_variable(const string &var) const { } } +#elif !defined(__APPLE__) + // Similarly, we define fallbacks on POSIX systems for the variables defined + // in the XDG Base Directory specification, so that they can be safely used + // in Config.prc files. + if (var == "XDG_CONFIG_HOME") { + Filename home_dir = Filename::get_home_directory(); + return home_dir.get_fullpath() + "/.config"; + + } else if (var == "XDG_CACHE_HOME") { + Filename home_dir = Filename::get_home_directory(); + return home_dir.get_fullpath() + "/.cache"; + + } else if (var == "XDG_DATA_HOME") { + Filename home_dir = Filename::get_home_directory(); + return home_dir.get_fullpath() + "/.local/share"; + } #endif // _WIN32 return string(); diff --git a/dtool/src/dtoolutil/filename.cxx b/dtool/src/dtoolutil/filename.cxx index 169f4bee05..c862c0aabf 100644 --- a/dtool/src/dtoolutil/filename.cxx +++ b/dtool/src/dtoolutil/filename.cxx @@ -600,8 +600,14 @@ get_user_appdata_directory() { user_appdata_directory.set_basename("files"); #else - // Posix case. - user_appdata_directory = get_home_directory(); + // Posix case. We follow the XDG base directory spec. + struct stat st; + const char *datadir = getenv("XDG_DATA_HOME"); + if (datadir != nullptr && stat(datadir, &st) == 0 && S_ISDIR(st.st_mode)) { + user_appdata_directory = datadir; + } else { + user_appdata_directory = Filename(get_home_directory(), ".local/share"); + } #endif // WIN32 @@ -649,9 +655,10 @@ get_common_appdata_directory() { common_appdata_directory.set_dirname(_internal_data_dir); common_appdata_directory.set_basename("files"); +#elif defined(__FreeBSD__) + common_appdata_directory = "/usr/local/share"; #else - // Posix case. - common_appdata_directory = "/var"; + common_appdata_directory = "/usr/share"; #endif // WIN32 if (common_appdata_directory.empty()) { diff --git a/makepanda/config.in b/makepanda/config.in index e61f73f04b..1317517339 100755 --- a/makepanda/config.in +++ b/makepanda/config.in @@ -89,7 +89,7 @@ hardware-animated-vertices #f # Enable the model-cache, but only for models, not textures. -model-cache-dir $HOME/.panda3d/cache +model-cache-dir $XDG_CACHE_HOME/panda3d model-cache-textures #f # This option specifies the default profiles for Cg shaders. diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b707623ed4..b578340d33 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2797,12 +2797,12 @@ else: configprc = ReadFile("makepanda/config.in") if (GetTarget() == 'windows'): - configprc = configprc.replace("$HOME/.panda3d", "$USER_APPDATA/Panda3D-%s" % MAJOR_VERSION) + configprc = configprc.replace("$XDG_CACHE_HOME/panda3d", "$USER_APPDATA/Panda3D-%s" % MAJOR_VERSION) else: configprc = configprc.replace("aux-display pandadx9", "") if (GetTarget() == 'darwin'): - configprc = configprc.replace(".panda3d/cache", "Library/Caches/Panda3D-%s" % MAJOR_VERSION) + configprc = configprc.replace("$XDG_CACHE_HOME/panda3d", "Library/Caches/Panda3D-%s" % MAJOR_VERSION) # OpenAL is not yet working well on OSX for us, so let's do this for now. configprc = configprc.replace("p3openal_audio", "p3fmod_audio") From 86cbdddd76017f196bd18eca6a89d2da9b33403d Mon Sep 17 00:00:00 2001 From: The Cheaterman Date: Thu, 13 Aug 2015 02:30:31 +0200 Subject: [PATCH 06/36] Fix float precision issues in bulletHeightfieldShape Closes: #152 --- panda/src/bullet/bulletHeightfieldShape.I | 8 ++++---- panda/src/bullet/bulletHeightfieldShape.cxx | 10 +++++----- panda/src/bullet/bulletHeightfieldShape.h | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/panda/src/bullet/bulletHeightfieldShape.I b/panda/src/bullet/bulletHeightfieldShape.I index 6607443110..5b0b36f0c2 100644 --- a/panda/src/bullet/bulletHeightfieldShape.I +++ b/panda/src/bullet/bulletHeightfieldShape.I @@ -30,8 +30,8 @@ BulletHeightfieldShape(const BulletHeightfieldShape ©) : _num_rows(copy._num_rows), _num_cols(copy._num_cols) { - _data = new float[_num_rows * _num_cols]; - memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(float)); + _data = new btScalar[_num_rows * _num_cols]; + memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(btScalar)); } /** @@ -44,6 +44,6 @@ operator = (const BulletHeightfieldShape ©) { _num_rows = copy._num_rows; _num_cols = copy._num_cols; - _data = new float[_num_rows * _num_cols]; - memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(float)); + _data = new btScalar[_num_rows * _num_cols]; + memcpy(_data, copy._data, _num_rows * _num_cols * sizeof(btScalar)); } diff --git a/panda/src/bullet/bulletHeightfieldShape.cxx b/panda/src/bullet/bulletHeightfieldShape.cxx index f6843d199b..65be739dc1 100644 --- a/panda/src/bullet/bulletHeightfieldShape.cxx +++ b/panda/src/bullet/bulletHeightfieldShape.cxx @@ -26,7 +26,7 @@ BulletHeightfieldShape(const PNMImage &image, PN_stdfloat max_height, BulletUpAx _num_rows = image.get_x_size(); _num_cols = image.get_y_size(); - _data = new float[_num_rows * _num_cols]; + _data = new btScalar[_num_rows * _num_cols]; for (int row=0; row < _num_rows; row++) { for (int column=0; column < _num_cols; column++) { @@ -75,10 +75,10 @@ BulletHeightfieldShape(Texture *tex, PN_stdfloat max_height, BulletUpAxis up) { _num_rows = tex->get_x_size() + 1; _num_cols = tex->get_y_size() + 1; - _data = new float[_num_rows * _num_cols]; + _data = new btScalar[_num_rows * _num_cols]; - PN_stdfloat step_x = 1.0 / (PN_stdfloat)tex->get_x_size(); - PN_stdfloat step_y = 1.0 / (PN_stdfloat)tex->get_y_size(); + btScalar step_x = 1.0 / (btScalar)tex->get_x_size(); + btScalar step_y = 1.0 / (btScalar)tex->get_y_size(); PT(TexturePeeker) peeker = tex->peek(); LColor sample; @@ -100,4 +100,4 @@ BulletHeightfieldShape(Texture *tex, PN_stdfloat max_height, BulletUpAxis up) { up, true, false); _shape->setUserPointer(this); -} \ No newline at end of file +} diff --git a/panda/src/bullet/bulletHeightfieldShape.h b/panda/src/bullet/bulletHeightfieldShape.h index c8bf6f7730..0b85972564 100644 --- a/panda/src/bullet/bulletHeightfieldShape.h +++ b/panda/src/bullet/bulletHeightfieldShape.h @@ -44,7 +44,7 @@ public: private: int _num_rows; int _num_cols; - float *_data; + btScalar *_data; btHeightfieldTerrainShape *_shape; public: From e07e5d02033eeb4306db11633d7e814bbe9fe938 Mon Sep 17 00:00:00 2001 From: Younguk Kim Date: Wed, 5 Jul 2017 19:49:46 +0900 Subject: [PATCH 07/36] Fix assert macros that cause a crash in non-debug --- panda/src/pgraph/renderAttrib.cxx | 2 +- panda/src/pgraph/renderState.cxx | 2 +- panda/src/pgraph/transformState.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/panda/src/pgraph/renderAttrib.cxx b/panda/src/pgraph/renderAttrib.cxx index 3b8c68ad0c..10db3de16d 100644 --- a/panda/src/pgraph/renderAttrib.cxx +++ b/panda/src/pgraph/renderAttrib.cxx @@ -514,7 +514,7 @@ release_new() { if (_saved_entry != -1) { _saved_entry = -1; - nassertv(_attribs->remove(this)); + nassertv_always(_attribs->remove(this)); } } diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index 8faef8676c..43a81bf83e 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -1690,7 +1690,7 @@ release_new() { if (_saved_entry != -1) { _saved_entry = -1; - nassertv(_states->remove(this)); + nassertv_always(_states->remove(this)); } } diff --git a/panda/src/pgraph/transformState.cxx b/panda/src/pgraph/transformState.cxx index ae0d99b794..3c28e358bf 100644 --- a/panda/src/pgraph/transformState.cxx +++ b/panda/src/pgraph/transformState.cxx @@ -1900,7 +1900,7 @@ release_new() { if (_saved_entry != -1) { _saved_entry = -1; - nassertv(_states->remove(this)); + nassertv_always(_states->remove(this)); } } From 32eb9b9e9f26d287b5a1749f2eb2d21a40f83003 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 5 Jul 2017 14:24:09 +0200 Subject: [PATCH 08/36] makepanda: fix missing Python link for PhysX --- makepanda/makepanda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b578340d33..5912388cda 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -4886,7 +4886,7 @@ if (PkgSkip("BULLET")==0 and not RUNTIME): # if (PkgSkip("PHYSX")==0): - OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC'] + OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] TargetAdd('p3physx_composite.obj', opts=OPTS, input='p3physx_composite.cxx') OPTS=['DIR:panda/src/physx', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] @@ -4906,7 +4906,7 @@ if (PkgSkip("PHYSX")==0): TargetAdd('libpandaphysx.dll', input='pandaphysx_pandaphysx.obj') TargetAdd('libpandaphysx.dll', input='p3physx_composite.obj') TargetAdd('libpandaphysx.dll', input=COMMON_PANDA_LIBS) - TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOARCH:PPC']) + TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOARCH:PPC', 'PYTHON']) OPTS=['DIR:panda/metalibs/pandaphysx', 'PHYSX', 'NOARCH:PPC', 'PYTHON'] TargetAdd('physx_module.obj', input='libpandaphysx.in') From e45af355ccaa5767a8f2d144a690707460cbe279 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Jul 2017 15:31:34 +0200 Subject: [PATCH 09/36] glgsg: fix multisample FBO regression (on Intel Windows driver) --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index d8b10292ec..305f7e3aab 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -2135,7 +2135,7 @@ reset() { _glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) get_extension_func("glGenerateMipmap"); _glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) - get_extension_func("glRenderbufferStorageMultisampleEXT"); + get_extension_func("glRenderbufferStorageMultisample"); _glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) get_extension_func("glBlitFramebuffer"); From a866f9fbcbf8e46b73e8f77c17da0a038bbd3480 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Jul 2017 15:46:37 +0200 Subject: [PATCH 10/36] audio: fix case of get_speaker_setup/set_speaker_setup methods --- panda/src/audio/audioManager.cxx | 4 ++-- panda/src/audio/audioManager.h | 4 ++-- panda/src/audiotraits/fmodAudioManager.cxx | 4 ++-- panda/src/audiotraits/fmodAudioManager.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/panda/src/audio/audioManager.cxx b/panda/src/audio/audioManager.cxx index 8dd52a8786..c09bbffc05 100644 --- a/panda/src/audio/audioManager.cxx +++ b/panda/src/audio/audioManager.cxx @@ -170,7 +170,7 @@ get_null_sound() { * */ int AudioManager:: -getSpeakerSetup() { +get_speaker_setup() { // intentionally blank return 0; } @@ -179,7 +179,7 @@ getSpeakerSetup() { * */ void AudioManager:: -setSpeakerSetup(SpeakerModeCategory cat) { +set_speaker_setup(SpeakerModeCategory cat) { // intentionally blank } diff --git a/panda/src/audio/audioManager.h b/panda/src/audio/audioManager.h index 262593a1d5..4ab88cc96b 100644 --- a/panda/src/audio/audioManager.h +++ b/panda/src/audio/audioManager.h @@ -62,8 +62,8 @@ PUBLISHED: SM_stream, }; - virtual int getSpeakerSetup(); - virtual void setSpeakerSetup(SpeakerModeCategory cat); + virtual int get_speaker_setup(); + virtual void set_speaker_setup(SpeakerModeCategory cat); virtual bool configure_filters(FilterProperties *config); // Create an AudioManager for each category of sounds you have. E.g. diff --git a/panda/src/audiotraits/fmodAudioManager.cxx b/panda/src/audiotraits/fmodAudioManager.cxx index dc98e76287..6dec5648f9 100644 --- a/panda/src/audiotraits/fmodAudioManager.cxx +++ b/panda/src/audiotraits/fmodAudioManager.cxx @@ -447,7 +447,7 @@ get_sound(MovieAudio *source, bool positional, int) { * This is to query if you are using a MultiChannel Setup. */ int FmodAudioManager:: -getSpeakerSetup() { +get_speaker_setup() { ReMutexHolder holder(_lock); FMOD_RESULT result; FMOD_SPEAKERMODE speakerMode; @@ -502,7 +502,7 @@ getSpeakerSetup() { * init or re-init the AudioManagers after Panda is running. */ void FmodAudioManager:: -setSpeakerSetup(AudioManager::SpeakerModeCategory cat) { +set_speaker_setup(AudioManager::SpeakerModeCategory cat) { ReMutexHolder holder(_lock); FMOD_RESULT result; FMOD_SPEAKERMODE speakerModeType = (FMOD_SPEAKERMODE)cat; diff --git a/panda/src/audiotraits/fmodAudioManager.h b/panda/src/audiotraits/fmodAudioManager.h index 9a5a9f3759..2508d36b8a 100644 --- a/panda/src/audiotraits/fmodAudioManager.h +++ b/panda/src/audiotraits/fmodAudioManager.h @@ -91,8 +91,8 @@ public: virtual PT(AudioSound) get_sound(const string&, bool positional = false, int mode=SM_heuristic); virtual PT(AudioSound) get_sound(MovieAudio *, bool positional = false, int mode=SM_heuristic); - virtual int getSpeakerSetup(); - virtual void setSpeakerSetup(SpeakerModeCategory cat); + virtual int get_speaker_setup(); + virtual void set_speaker_setup(SpeakerModeCategory cat); virtual void set_volume(PN_stdfloat); virtual PN_stdfloat get_volume() const; From 84520ce21c9123273656e8854bdc20c3ac1afcc2 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Jul 2017 19:53:23 +0200 Subject: [PATCH 11/36] display: prefer 24-bit depth buffer on Intel over 16-bit --- panda/src/display/frameBufferProperties.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/panda/src/display/frameBufferProperties.cxx b/panda/src/display/frameBufferProperties.cxx index 98b8341322..cd6177f42c 100644 --- a/panda/src/display/frameBufferProperties.cxx +++ b/panda/src/display/frameBufferProperties.cxx @@ -581,9 +581,13 @@ get_quality(const FrameBufferProperties &reqs) const { } } - // Bonus for each depth bit. Extra: 2 per bit. + // Bonus for each depth bit. Extra: 8 per bit. + // Please note that the Intel Windows driver only gives extra depth in + // combination with a stencil buffer, so we need 8 extra depth bits to + // outweigh the penalty of 50 for the unwanted stencil buffer, otherwise we + // will end up only getting 16-bit depth. if (reqs._property[FBP_depth_bits] != 0) { - quality += 2 * _property[FBP_depth_bits]; + quality += 8 * _property[FBP_depth_bits]; } // Bonus for each multisample. Extra: 2 per sample. From 1fd8af5acde06e2c3ba54bd8dfa624387c37fd59 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Jul 2017 19:55:29 +0200 Subject: [PATCH 12/36] express: add C++11 methods to ordered_vector --- panda/src/express/ordered_vector.I | 98 ++++++++++++++++++++++++++++++ panda/src/express/ordered_vector.h | 12 ++++ 2 files changed, 110 insertions(+) diff --git a/panda/src/express/ordered_vector.I b/panda/src/express/ordered_vector.I index 24a74c6a45..287998b85c 100644 --- a/panda/src/express/ordered_vector.I +++ b/panda/src/express/ordered_vector.I @@ -109,6 +109,44 @@ rend() const { return _vector.rend(); } +/** + * Returns the iterator that marks the first element in the ordered vector. + */ +template +INLINE TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: +cbegin() const { + return _vector.begin(); +} + +/** + * Returns the iterator that marks the end of the ordered vector. + */ +template +INLINE TYPENAME ordered_vector::CONST_ITERATOR ordered_vector:: +cend() const { + return _vector.end(); +} + +/** + * Returns the iterator that marks the first element in the ordered vector, + * when viewed in reverse order. + */ +template +INLINE TYPENAME ordered_vector::CONST_REVERSE_ITERATOR ordered_vector:: +crbegin() const { + return _vector.rbegin(); +} + +/** + * Returns the iterator that marks the end of the ordered vector, when viewed + * in reverse order. + */ +template +INLINE TYPENAME ordered_vector::CONST_REVERSE_ITERATOR ordered_vector:: +crend() const { + return _vector.rend(); +} + /** * Returns the nth element. */ @@ -127,6 +165,54 @@ operator [] (TYPENAME ordered_vector::SIZE_TYPE n) const { return _vector[n]; } +/** + * Returns a reference to the first element. + */ +template +INLINE TYPENAME ordered_vector::REFERENCE ordered_vector:: +front() { +#ifdef _DEBUG + assert(!_vector.empty()); +#endif + return _vector[0]; +} + +/** + * Returns a const reference to the first element. + */ +template +INLINE TYPENAME ordered_vector::CONST_REFERENCE ordered_vector:: +front() const { +#ifdef _DEBUG + assert(!_vector.empty()); +#endif + return _vector[0]; +} + +/** + * Returns a reference to the first element. + */ +template +INLINE TYPENAME ordered_vector::REFERENCE ordered_vector:: +back() { +#ifdef _DEBUG + assert(!_vector.empty()); +#endif + return _vector[_vector.size() - 1]; +} + +/** + * Returns a const reference to the last element. + */ +template +INLINE TYPENAME ordered_vector::CONST_REFERENCE ordered_vector:: +back() const { +#ifdef _DEBUG + assert(!_vector.empty()); +#endif + return _vector[_vector.size() - 1]; +} + /** * Returns the number of elements in the ordered vector. */ @@ -530,6 +616,18 @@ push_back(const value_type &key) { _vector.push_back(key); } +/** + * Adds the new element to the end of the vector without regard for proper + * sorting. This is a bad idea to do except to populate the vector the first + * time; be sure to call sort() after you have added all the elements. + */ +template +INLINE void ordered_vector:: +push_back(value_type &&key) { + TAU_PROFILE("ordered_vector::push_back()", " ", TAU_USER); + _vector.push_back(move(key)); +} + /** * Removes the last element at the end of the vector. */ diff --git a/panda/src/express/ordered_vector.h b/panda/src/express/ordered_vector.h index 7eacfc375e..e9e3a03693 100644 --- a/panda/src/express/ordered_vector.h +++ b/panda/src/express/ordered_vector.h @@ -147,10 +147,21 @@ public: INLINE CONST_REVERSE_ITERATOR rbegin() const; INLINE CONST_REVERSE_ITERATOR rend() const; + INLINE CONST_ITERATOR cbegin() const; + INLINE CONST_ITERATOR cend() const; + INLINE CONST_REVERSE_ITERATOR crbegin() const; + INLINE CONST_REVERSE_ITERATOR crend() const; + // Random access. INLINE reference operator [] (SIZE_TYPE n); INLINE const_reference operator [] (SIZE_TYPE n) const; + INLINE reference front(); + INLINE const_reference front() const; + + INLINE reference back(); + INLINE const_reference back() const; + // Size information. INLINE SIZE_TYPE size() const; INLINE SIZE_TYPE max_size() const; @@ -201,6 +212,7 @@ public: bool verify_list_nonunique() const; INLINE void push_back(const VALUE_TYPE &key); + INLINE void push_back(VALUE_TYPE &&key); INLINE void pop_back(); INLINE void resize(SIZE_TYPE n); INLINE void resize(SIZE_TYPE n, const VALUE_TYPE &value); From 9a40febdb9ce40a0936d164a2ed3d72ddf7dcc8a Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Jul 2017 20:33:45 +0200 Subject: [PATCH 13/36] shadows: fix light buffer not being destructed after light removal Fixes LP 1672089 --- panda/src/pgraph/light.cxx | 14 +++++ panda/src/pgraph/light.h | 3 + panda/src/pgraph/lightAttrib.I | 13 ----- panda/src/pgraph/lightAttrib.cxx | 74 ++++++++++++++++++++++--- panda/src/pgraph/lightAttrib.h | 3 +- panda/src/pgraphnodes/lightLensNode.cxx | 32 ++++++++++- panda/src/pgraphnodes/lightLensNode.h | 8 +++ 7 files changed, 124 insertions(+), 23 deletions(-) diff --git a/panda/src/pgraph/light.cxx b/panda/src/pgraph/light.cxx index b159450142..82b53f5757 100644 --- a/panda/src/pgraph/light.cxx +++ b/panda/src/pgraph/light.cxx @@ -157,6 +157,20 @@ get_attenuation() const { return no_atten; } +/** + * This is called when the light is added to a LightAttrib. + */ +void Light:: +attrib_ref() { +} + +/** + * This is called when the light is removed from a LightAttrib. + */ +void Light:: +attrib_unref() { +} + /** * Computes the vector from a particular vertex to this light. The exact * vector depends on the type of light (e.g. point lights return a different diff --git a/panda/src/pgraph/light.h b/panda/src/pgraph/light.h index eeca3409bd..ee6e906356 100644 --- a/panda/src/pgraph/light.h +++ b/panda/src/pgraph/light.h @@ -64,6 +64,9 @@ PUBLISHED: MAKE_PROPERTY(priority, get_priority, set_priority); public: + virtual void attrib_ref(); + virtual void attrib_unref(); + virtual void output(ostream &out) const=0; virtual void write(ostream &out, int indent_level) const=0; virtual void bind(GraphicsStateGuardianBase *gsg, const NodePath &light, diff --git a/panda/src/pgraph/lightAttrib.I b/panda/src/pgraph/lightAttrib.I index e876055642..0c6686181b 100644 --- a/panda/src/pgraph/lightAttrib.I +++ b/panda/src/pgraph/lightAttrib.I @@ -18,19 +18,6 @@ INLINE LightAttrib:: LightAttrib() : _off_all_lights(false), _num_non_ambient_lights(0) { } -/** - * Use LightAttrib::make() to construct a new LightAttrib object. The copy - * constructor is only defined to facilitate methods like add_on_light(). - */ -INLINE LightAttrib:: -LightAttrib(const LightAttrib ©) : - _on_lights(copy._on_lights), - _off_lights(copy._off_lights), - _off_all_lights(copy._off_all_lights), - _sort_seq(UpdateSeq::old()) -{ -} - /** * Returns the number of lights that are turned on by the attribute. */ diff --git a/panda/src/pgraph/lightAttrib.cxx b/panda/src/pgraph/lightAttrib.cxx index 8bb66bcec2..2fb58c106d 100644 --- a/panda/src/pgraph/lightAttrib.cxx +++ b/panda/src/pgraph/lightAttrib.cxx @@ -47,6 +47,44 @@ public: } }; +/** + * Use LightAttrib::make() to construct a new LightAttrib object. The copy + * constructor is only defined to facilitate methods like add_on_light(). + */ +LightAttrib:: +LightAttrib(const LightAttrib ©) : + _on_lights(copy._on_lights), + _off_lights(copy._off_lights), + _off_all_lights(copy._off_all_lights), + _sort_seq(UpdateSeq::old()) +{ + // Increase the attrib_ref of all the lights in this attribute. + Lights::const_iterator it; + for (it = _on_lights.begin(); it != _on_lights.end(); ++it) { + Light *lobj = (*it).node()->as_light(); + nassertd(lobj != nullptr) continue; + lobj->attrib_ref(); + } +} + +/** + * Destructor. + */ +LightAttrib:: +~LightAttrib() { + // Call attrib_unref() on all on lights. + Lights::const_iterator it; + for (it = _on_lights.begin(); it != _on_lights.end(); ++it) { + const NodePath &np = *it; + if (!np.is_empty()) { + Light *lobj = np.node()->as_light(); + if (lobj != nullptr) { + lobj->attrib_unref(); + } + } + } +} + /** * Constructs a new LightAttrib object that turns on (or off, according to op) * the indicated light(s). @@ -376,14 +414,17 @@ make_all_off() { */ CPT(RenderAttrib) LightAttrib:: add_on_light(const NodePath &light) const { - nassertr(!light.is_empty() && light.node()->as_light() != (Light *)NULL, this); + nassertr(!light.is_empty(), this); + Light *lobj = light.node()->as_light(); + nassertr(lobj != nullptr, this); + LightAttrib *attrib = new LightAttrib(*this); - attrib->_on_lights.insert(light); - attrib->_off_lights.erase(light); pair insert_result = attrib->_on_lights.insert(Lights::value_type(light)); if (insert_result.second) { + lobj->attrib_ref(); + // Also ensure it is removed from the off_lights list. attrib->_off_lights.erase(light); } @@ -397,9 +438,14 @@ add_on_light(const NodePath &light) const { */ CPT(RenderAttrib) LightAttrib:: remove_on_light(const NodePath &light) const { - nassertr(!light.is_empty() && light.node()->as_light() != (Light *)NULL, this); + nassertr(!light.is_empty(), this); + Light *lobj = light.node()->as_light(); + nassertr(lobj != nullptr, this); + LightAttrib *attrib = new LightAttrib(*this); - attrib->_on_lights.erase(light); + if (attrib->_on_lights.erase(light)) { + lobj->attrib_unref(); + } return return_new(attrib); } @@ -409,12 +455,17 @@ remove_on_light(const NodePath &light) const { */ CPT(RenderAttrib) LightAttrib:: add_off_light(const NodePath &light) const { - nassertr(!light.is_empty() && light.node()->as_light() != (Light *)NULL, this); + nassertr(!light.is_empty(), this); + Light *lobj = light.node()->as_light(); + nassertr(lobj != nullptr, this); + LightAttrib *attrib = new LightAttrib(*this); if (!_off_all_lights) { attrib->_off_lights.insert(light); } - attrib->_on_lights.erase(light); + if (attrib->_on_lights.erase(light)) { + lobj->attrib_unref(); + } return return_new(attrib); } @@ -960,6 +1011,10 @@ finalize(BamReader *manager) { // If it's in the registry, replace it. _on_lights[i] = areg->get_node(n); } + + Light *lobj = _on_lights[i].node()->as_light(); + nassertd(lobj != nullptr) continue; + lobj->attrib_ref(); } } else { @@ -992,10 +1047,15 @@ finalize(BamReader *manager) { if (n != -1) { // If it's in the registry, add that NodePath. _on_lights.push_back(areg->get_node(n)); + node = _on_lights.back().node(); } else { // Otherwise, add any arbitrary NodePath. Complain if it's ambiguous. _on_lights.push_back(NodePath(node)); } + + Light *lobj = node->as_light(); + nassertd(lobj != nullptr) continue; + lobj->attrib_ref(); } } diff --git a/panda/src/pgraph/lightAttrib.h b/panda/src/pgraph/lightAttrib.h index 1158531bc0..eaa86ff895 100644 --- a/panda/src/pgraph/lightAttrib.h +++ b/panda/src/pgraph/lightAttrib.h @@ -30,9 +30,10 @@ class EXPCL_PANDA_PGRAPH LightAttrib : public RenderAttrib { protected: INLINE LightAttrib(); - INLINE LightAttrib(const LightAttrib ©); + LightAttrib(const LightAttrib ©); PUBLISHED: + virtual ~LightAttrib(); // This is the old, deprecated interface to LightAttrib. Do not use any of // these methods for new code; these methods will be removed soon. diff --git a/panda/src/pgraphnodes/lightLensNode.cxx b/panda/src/pgraphnodes/lightLensNode.cxx index bc3e134116..a843123cff 100644 --- a/panda/src/pgraphnodes/lightLensNode.cxx +++ b/panda/src/pgraphnodes/lightLensNode.cxx @@ -27,7 +27,8 @@ TypeHandle LightLensNode::_type_handle; */ LightLensNode:: LightLensNode(const string &name, Lens *lens) : - Camera(name, lens) + Camera(name, lens), + _attrib_count(0) { set_active(false); _shadow_caster = false; @@ -46,6 +47,10 @@ LightLensNode:: ~LightLensNode() { set_active(false); clear_shadow_buffers(); + + // If this triggers, the number of attrib_ref() didn't match the number of + // attrib_unref() calls, probably indicating a bug in LightAttrib. + nassertv(AtomicAdjust::get(_attrib_count) == 0); } /** @@ -57,7 +62,8 @@ LightLensNode(const LightLensNode ©) : Camera(copy), _shadow_caster(copy._shadow_caster), _sb_size(copy._sb_size), - _sb_sort(-10) + _sb_sort(-10), + _attrib_count(0) { } @@ -81,6 +87,28 @@ clear_shadow_buffers() { _sbuffers.clear(); } + +/** + * This is called when the light is added to a LightAttrib. + */ +void LightLensNode:: +attrib_ref() { + AtomicAdjust::inc(_attrib_count); +} + +/** + * This is called when the light is removed from a LightAttrib. + */ +void LightLensNode:: +attrib_unref() { + // When it is removed from the last LightAttrib, destroy the shadow buffers. + // This is necessary to break the circular reference that the buffer holds + // on this node, via the display region's camera. + if (!AtomicAdjust::dec(_attrib_count)) { + clear_shadow_buffers(); + } +} + /** * Returns the Light object upcast to a PandaNode. */ diff --git a/panda/src/pgraphnodes/lightLensNode.h b/panda/src/pgraphnodes/lightLensNode.h index 0c4b329b16..11c259e5e5 100644 --- a/panda/src/pgraphnodes/lightLensNode.h +++ b/panda/src/pgraphnodes/lightLensNode.h @@ -20,6 +20,7 @@ #include "camera.h" #include "graphicsStateGuardianBase.h" #include "graphicsOutputBase.h" +#include "atomicAdjust.h" class ShaderGenerator; class GraphicsStateGuardian; @@ -59,7 +60,14 @@ protected: typedef pmap ShadowBuffers; ShadowBuffers _sbuffers; + // This counts how many LightAttribs in the world are referencing this + // LightLensNode object. + AtomicAdjust::Integer _attrib_count; + public: + virtual void attrib_ref(); + virtual void attrib_unref(); + virtual PandaNode *as_node(); virtual Light *as_light(); From 7228bc7e5fc846e575786c10cd8af6f09227bda4 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 01:51:12 +0200 Subject: [PATCH 14/36] Fix NATIVE_WORDSIZE on 64-bit Windows (fixes memory alignment) --- dtool/src/dtoolbase/dtoolbase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index ae74fd644f..a3cb5f0614 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -332,7 +332,7 @@ typedef struct _object PyObject; #ifdef __WORDSIZE #define NATIVE_WORDSIZE __WORDSIZE -#elif defined(_LP64) +#elif defined(_LP64) || defined(_WIN64) #define NATIVE_WORDSIZE 64 #else #define NATIVE_WORDSIZE 32 From 2e5051ac04b07e5f8618dfc186bb9d6c951e5088 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 01:54:37 +0200 Subject: [PATCH 15/36] bullet: fix crash when adding non-indexed GeomTriangles to trimesh --- panda/src/bullet/bulletTriangleMesh.cxx | 38 ++++++++++++++++++++----- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/panda/src/bullet/bulletTriangleMesh.cxx b/panda/src/bullet/bulletTriangleMesh.cxx index 7dd5d00c69..8a74e61ff5 100644 --- a/panda/src/bullet/bulletTriangleMesh.cxx +++ b/panda/src/bullet/bulletTriangleMesh.cxx @@ -53,6 +53,10 @@ void BulletTriangleMesh:: preallocate(int num_verts, int num_indices) { _vertices.reserve(num_verts); _indices.reserve(num_indices); + + btIndexedMesh &mesh = _mesh.getIndexedMeshArray()[0]; + mesh.m_vertexBase = (unsigned char*)&_vertices[0]; + mesh.m_triangleIndexBase = (unsigned char *)&_indices[0]; } /** @@ -160,12 +164,22 @@ add_geom(const Geom *geom, bool remove_duplicate_vertices, const TransformState _indices.reserve(_indices.size() + num_vertices); mesh.m_numTriangles += num_vertices / 3; - GeomVertexReader index(prim->get_vertices(), 0); - while (!index.is_at_end()) { - _indices.push_back(index_offset + index.get_data1i()); + CPT(GeomVertexArrayData) vertices = prim->get_vertices(); + if (vertices != nullptr) { + GeomVertexReader index(move(vertices), 0); + while (!index.is_at_end()) { + _indices.push_back(index_offset + index.get_data1i()); + } + } else { + int index = index_offset + prim->get_first_vertex(); + int end_index = index + num_vertices; + while (index < end_index) { + _indices.push_back(index++); + } } } } + nassertv(mesh.m_numTriangles * 3 == _indices.size()); } else { // Collect points @@ -193,12 +207,22 @@ add_geom(const Geom *geom, bool remove_duplicate_vertices, const TransformState _indices.reserve(_indices.size() + num_vertices); mesh.m_numTriangles += num_vertices / 3; - GeomVertexReader index(prim->get_vertices(), 0); - while (!index.is_at_end()) { - _indices.push_back(find_or_add_vertex(points[index.get_data1i()])); + CPT(GeomVertexArrayData) vertices = prim->get_vertices(); + if (vertices != nullptr) { + GeomVertexReader index(move(vertices), 0); + while (!index.is_at_end()) { + _indices.push_back(find_or_add_vertex(points[index.get_data1i()])); + } + } else { + int index = prim->get_first_vertex(); + int end_index = index + num_vertices; + while (index < end_index) { + _indices.push_back(find_or_add_vertex(points[index])); + } } } } + nassertv(mesh.m_numTriangles * 3 == _indices.size()); } // Reset the pointers, since the vectors may have been reallocated. @@ -282,7 +306,7 @@ unsigned int BulletTriangleMesh:: find_or_add_vertex(const LVecBase3 &p) { btVector3 vertex = LVecBase3_to_btVector3(p); - for (unsigned int i = 0; i < _vertices.size(); ++i) { + for (int i = 0; i < _vertices.size(); ++i) { if ((_vertices[i] - vertex).length2() <= _welding_distance) { return i; } From 5fffbbce47c79992f74bbb11e22085fe124f61a7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 14:21:40 +0200 Subject: [PATCH 16/36] express: error if Windows-style path is used (LP 1429241) --- panda/src/express/virtualFileSystem.cxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/panda/src/express/virtualFileSystem.cxx b/panda/src/express/virtualFileSystem.cxx index c331dd1055..da7797ec9d 100644 --- a/panda/src/express/virtualFileSystem.cxx +++ b/panda/src/express/virtualFileSystem.cxx @@ -1226,6 +1226,24 @@ do_get_file(const Filename &filename, int open_flags) const { } } +#if defined(_WIN32) && !defined(NDEBUG) + if (!found_file) { + // The file could not be found. Perhaps this is because the user passed + // in a Windows-style path where a Unix-style path was expected? + if (filename.length() > 2 && isalpha(filename[0]) && filename[1] == ':' && + (filename[2] == '\\' || filename[2] == '/')) { + + Filename corrected_fn = Filename::from_os_specific(filename); + if (corrected_fn.exists()) { + express_cat.warning() + << "Filename uses Windows-style path: " << filename << "\n"; + express_cat.warning() + << " expected Unix-style path: " << corrected_fn << "\n"; + } + } + } +#endif + return found_file; } From 925ce854d010ca2f872ad0788a22b9663ac91b53 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 19:50:09 +0200 Subject: [PATCH 17/36] general: make DO_MEMORY_USAGE setting not change ABI compatibility --- dtool/src/dtoolbase/memoryHook.cxx | 25 +-- dtool/src/dtoolbase/memoryHook.h | 4 +- dtool/src/dtoolbase/typeRegistryNode.cxx | 2 - dtool/src/dtoolbase/typeRegistryNode.h | 2 - panda/src/express/memoryInfo.h | 3 + panda/src/express/memoryUsage.I | 104 +++++++++- panda/src/express/memoryUsage.cxx | 180 +++++++++++++++--- panda/src/express/memoryUsage.h | 22 ++- .../src/express/memoryUsagePointerCounts.cxx | 11 +- panda/src/express/memoryUsagePointerCounts.h | 4 - panda/src/express/memoryUsagePointers.cxx | 44 +++-- panda/src/express/memoryUsagePointers.h | 7 +- panda/src/express/pointerToBase.I | 5 +- panda/src/express/pointerToBase.h | 2 - panda/src/express/threadSafePointerToBase.I | 5 +- panda/src/express/threadSafePointerToBase.h | 2 - panda/src/gobj/internalName.h | 2 - panda/src/mathutil/geometricBoundingVolume.h | 2 - panda/src/pgraph/cullPlanes.h | 2 - panda/src/pgraph/cullableObject.I | 6 +- panda/src/pgraph/cullableObject.h | 13 +- panda/src/pgraph/nodePathComponent.h | 2 - panda/src/pgraph/pandaNode.h | 2 - panda/src/pgraph/renderState.h | 2 - panda/src/pgraph/transformState.h | 2 - panda/src/putil/copyOnWriteObject.h | 2 - panda/src/putil/typedWritableReferenceCount.h | 3 +- 27 files changed, 333 insertions(+), 127 deletions(-) diff --git a/dtool/src/dtoolbase/memoryHook.cxx b/dtool/src/dtoolbase/memoryHook.cxx index 224fd3107b..efc2fc4392 100644 --- a/dtool/src/dtoolbase/memoryHook.cxx +++ b/dtool/src/dtoolbase/memoryHook.cxx @@ -202,13 +202,11 @@ MemoryHook() { #endif // WIN32 -#ifdef DO_MEMORY_USAGE _total_heap_single_size = 0; _total_heap_array_size = 0; _requested_heap_size = 0; _total_mmap_size = 0; _max_heap_size = ~(size_t)0; -#endif } /** @@ -216,19 +214,16 @@ MemoryHook() { */ MemoryHook:: MemoryHook(const MemoryHook ©) : - _page_size(copy._page_size) -{ -#ifdef DO_MEMORY_USAGE - _total_heap_single_size = copy._total_heap_single_size; - _total_heap_array_size = copy._total_heap_array_size; - _requested_heap_size = copy._requested_heap_size; - _total_mmap_size = copy._total_mmap_size; - _max_heap_size = copy._max_heap_size; -#endif + _page_size(copy._page_size), + _total_heap_single_size(copy._total_heap_single_size), + _total_heap_array_size(copy._total_heap_array_size), + _requested_heap_size(copy._requested_heap_size), + _total_mmap_size(copy._total_mmap_size), + _max_heap_size(copy._max_heap_size) { - ((MutexImpl &)copy._lock).acquire(); + copy._lock.acquire(); _deleted_chains = copy._deleted_chains; - ((MutexImpl &)copy._lock).release(); + copy._lock.release(); } /** @@ -631,7 +626,6 @@ alloc_fail(size_t attempted_size) { abort(); } -#ifdef DO_MEMORY_USAGE /** * This callback method is called whenever the total allocated heap size * exceeds _max_heap_size. It's mainly intended for reporting memory leaks, @@ -642,6 +636,7 @@ alloc_fail(size_t attempted_size) { */ void MemoryHook:: overflow_heap_size() { +#ifdef DO_MEMORY_USAGE _max_heap_size = ~(size_t)0; -} #endif // DO_MEMORY_USAGE +} diff --git a/dtool/src/dtoolbase/memoryHook.h b/dtool/src/dtoolbase/memoryHook.h index 687e348aef..18ce70c0bb 100644 --- a/dtool/src/dtoolbase/memoryHook.h +++ b/dtool/src/dtoolbase/memoryHook.h @@ -67,7 +67,6 @@ public: INLINE static size_t get_ptr_size(void *ptr); -#ifdef DO_MEMORY_USAGE protected: TVOLATILE AtomicAdjust::Integer _total_heap_single_size; TVOLATILE AtomicAdjust::Integer _total_heap_array_size; @@ -79,7 +78,6 @@ protected: size_t _max_heap_size; virtual void overflow_heap_size(); -#endif // DO_MEMORY_USAGE private: size_t _page_size; @@ -87,7 +85,7 @@ private: typedef map DeletedChains; DeletedChains _deleted_chains; - MutexImpl _lock; + mutable MutexImpl _lock; }; #include "memoryHook.I" diff --git a/dtool/src/dtoolbase/typeRegistryNode.cxx b/dtool/src/dtoolbase/typeRegistryNode.cxx index cdc45d7beb..a88533a769 100644 --- a/dtool/src/dtoolbase/typeRegistryNode.cxx +++ b/dtool/src/dtoolbase/typeRegistryNode.cxx @@ -26,9 +26,7 @@ TypeRegistryNode(TypeHandle handle, const string &name, TypeHandle &ref) : _handle(handle), _name(name), _ref(ref) { clear_subtree(); -#ifdef DO_MEMORY_USAGE memset(_memory_usage, 0, sizeof(_memory_usage)); -#endif } /** diff --git a/dtool/src/dtoolbase/typeRegistryNode.h b/dtool/src/dtoolbase/typeRegistryNode.h index 7eb64f8a65..46e4b9f5a1 100644 --- a/dtool/src/dtoolbase/typeRegistryNode.h +++ b/dtool/src/dtoolbase/typeRegistryNode.h @@ -47,9 +47,7 @@ public: Classes _parent_classes; Classes _child_classes; -#ifdef DO_MEMORY_USAGE AtomicAdjust::Integer _memory_usage[TypeHandle::MC_limit]; -#endif static bool _paranoid_inheritance; diff --git a/panda/src/express/memoryInfo.h b/panda/src/express/memoryInfo.h index 238cec05e3..c65b890887 100644 --- a/panda/src/express/memoryInfo.h +++ b/panda/src/express/memoryInfo.h @@ -75,6 +75,9 @@ private: #include "memoryInfo.I" +#else +class MemoryInfo; + #endif // DO_MEMORY_USAGE #endif diff --git a/panda/src/express/memoryUsage.I b/panda/src/express/memoryUsage.I index f9de4f8c93..a4c2447189 100644 --- a/panda/src/express/memoryUsage.I +++ b/panda/src/express/memoryUsage.I @@ -16,9 +16,13 @@ * to true, indicating that this class will be in effect. If this returns * false, the user has indicated not to do any of this. */ -INLINE bool MemoryUsage:: +ALWAYS_INLINE bool MemoryUsage:: get_track_memory_usage() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->_track_memory_usage; +#else + return false; +#endif } /** @@ -26,7 +30,19 @@ get_track_memory_usage() { */ INLINE void MemoryUsage:: record_pointer(ReferenceCount *ptr) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_record_pointer(ptr); +#endif +} + +/** + * Indicates that the given pointer has been recently allocated. + */ +INLINE void MemoryUsage:: +record_pointer(void *ptr, TypeHandle type) { +#ifdef DO_MEMORY_USAGE + get_global_ptr()->ns_record_pointer(ptr, type); +#endif } /** @@ -37,7 +53,9 @@ record_pointer(ReferenceCount *ptr) { */ INLINE void MemoryUsage:: update_type(ReferenceCount *ptr, TypeHandle type) { - get_global_ptr()->ns_update_type(ptr, type); +#ifdef DO_MEMORY_USAGE + get_global_ptr()->ns_update_type((void *)ptr, type); +#endif } /** @@ -48,7 +66,21 @@ update_type(ReferenceCount *ptr, TypeHandle type) { */ INLINE void MemoryUsage:: update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { - get_global_ptr()->ns_update_type(ptr, typed_ptr); +#ifdef DO_MEMORY_USAGE + get_global_ptr()->ns_update_type((void *)ptr, typed_ptr); +#endif +} + +/** + * Associates the indicated type with the given pointer. This should be + * called by functions (e.g. the constructor) that know more specifically + * what type of thing we've got. + */ +INLINE void MemoryUsage:: +update_type(void *ptr, TypeHandle type) { +#ifdef DO_MEMORY_USAGE + get_global_ptr()->ns_update_type(ptr, type); +#endif } /** @@ -56,7 +88,9 @@ update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { */ INLINE void MemoryUsage:: remove_pointer(ReferenceCount *ptr) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_remove_pointer(ptr); +#endif } /** @@ -65,7 +99,11 @@ remove_pointer(ReferenceCount *ptr) { */ INLINE bool MemoryUsage:: is_tracking() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->_track_memory_usage; +#else + return false; +#endif } /** @@ -75,7 +113,11 @@ is_tracking() { */ INLINE bool MemoryUsage:: is_counting() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->_count_memory_usage; +#else + return false; +#endif } /** @@ -84,7 +126,11 @@ is_counting() { */ INLINE size_t MemoryUsage:: get_current_cpp_size() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->_current_cpp_size; +#else + return 0; +#endif } /** @@ -93,7 +139,11 @@ get_current_cpp_size() { */ INLINE size_t MemoryUsage:: get_total_cpp_size() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->_total_cpp_size; +#else + return 0; +#endif } /** @@ -102,7 +152,11 @@ get_total_cpp_size() { */ INLINE size_t MemoryUsage:: get_panda_heap_single_size() { +#ifdef DO_MEMORY_USAGE return (size_t)AtomicAdjust::get(get_global_ptr()->_total_heap_single_size); +#else + return 0; +#endif } /** @@ -111,7 +165,11 @@ get_panda_heap_single_size() { */ INLINE size_t MemoryUsage:: get_panda_heap_array_size() { +#ifdef DO_MEMORY_USAGE return (size_t)AtomicAdjust::get(get_global_ptr()->_total_heap_array_size); +#else + return 0; +#endif } /** @@ -121,7 +179,7 @@ get_panda_heap_array_size() { */ INLINE size_t MemoryUsage:: get_panda_heap_overhead() { -#if defined(USE_MEMORY_DLMALLOC) || defined(USE_MEMORY_PTMALLOC2) +#if defined(DO_MEMORY_USAGE) && (defined(USE_MEMORY_DLMALLOC) || defined(USE_MEMORY_PTMALLOC2)) MemoryUsage *mu = get_global_ptr(); return (size_t)(AtomicAdjust::get(mu->_requested_heap_size) - AtomicAdjust::get(mu->_total_heap_single_size) - AtomicAdjust::get(mu->_total_heap_array_size)); #else @@ -135,7 +193,11 @@ get_panda_heap_overhead() { */ INLINE size_t MemoryUsage:: get_panda_mmap_size() { +#ifdef DO_MEMORY_USAGE return (size_t)AtomicAdjust::get(get_global_ptr()->_total_mmap_size); +#else + return 0; +#endif } /** @@ -152,6 +214,7 @@ get_panda_mmap_size() { */ INLINE size_t MemoryUsage:: get_external_size() { +#ifdef DO_MEMORY_USAGE MemoryUsage *mu = get_global_ptr(); if (mu->_count_memory_usage) { // We can only possibly know this with memory counting, which tracks every @@ -169,6 +232,9 @@ get_external_size() { } else { return 0; } +#else + return 0; +#endif } /** @@ -177,6 +243,7 @@ get_external_size() { */ INLINE size_t MemoryUsage:: get_total_size() { +#ifdef DO_MEMORY_USAGE MemoryUsage *mu = get_global_ptr(); if (mu->_count_memory_usage) { return mu->_total_size + (size_t)mu->_requested_heap_size; @@ -187,6 +254,9 @@ get_total_size() { return (size_t)(AtomicAdjust::get(mu->_total_heap_single_size) + AtomicAdjust::get(mu->_total_heap_array_size)); #endif } +#else + return 0; +#endif } /** @@ -194,7 +264,11 @@ get_total_size() { */ INLINE int MemoryUsage:: get_num_pointers() { +#ifdef DO_MEMORY_USAGE return get_global_ptr()->ns_get_num_pointers(); +#else + return 0; +#endif } /** @@ -203,7 +277,9 @@ get_num_pointers() { */ INLINE void MemoryUsage:: get_pointers(MemoryUsagePointers &result) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_get_pointers(result); +#endif } /** @@ -212,7 +288,9 @@ get_pointers(MemoryUsagePointers &result) { */ INLINE void MemoryUsage:: get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_get_pointers_of_type(result, type); +#endif } /** @@ -221,7 +299,9 @@ get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { */ INLINE void MemoryUsage:: get_pointers_of_age(MemoryUsagePointers &result, double from, double to) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_get_pointers_of_age(result, from, to); +#endif } /** @@ -242,7 +322,9 @@ get_pointers_of_age(MemoryUsagePointers &result, double from, double to) { */ INLINE void MemoryUsage:: get_pointers_with_zero_count(MemoryUsagePointers &result) { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_get_pointers_with_zero_count(result); +#endif } /** @@ -253,7 +335,9 @@ get_pointers_with_zero_count(MemoryUsagePointers &result) { */ INLINE void MemoryUsage:: freeze() { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_freeze(); +#endif } /** @@ -261,7 +345,9 @@ freeze() { */ INLINE void MemoryUsage:: show_current_types() { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_show_current_types(); +#endif } /** @@ -270,7 +356,9 @@ show_current_types() { */ INLINE void MemoryUsage:: show_trend_types() { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_show_trend_types(); +#endif } /** @@ -278,7 +366,9 @@ show_trend_types() { */ INLINE void MemoryUsage:: show_current_ages() { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_show_current_ages(); +#endif } /** @@ -287,7 +377,9 @@ show_current_ages() { */ INLINE void MemoryUsage:: show_trend_ages() { +#ifdef DO_MEMORY_USAGE get_global_ptr()->ns_show_trend_ages(); +#endif } /** @@ -295,6 +387,7 @@ show_trend_ages() { */ INLINE MemoryUsage *MemoryUsage:: get_global_ptr() { +#ifdef DO_MEMORY_USAGE #ifdef __GNUC__ // Tell the compiler that this is an unlikely branch. if (__builtin_expect(_global_ptr == nullptr, 0)) { @@ -305,4 +398,7 @@ get_global_ptr() { } return _global_ptr; +#else + return nullptr; +#endif } diff --git a/panda/src/express/memoryUsage.cxx b/panda/src/express/memoryUsage.cxx index a834da9dad..178de476fa 100644 --- a/panda/src/express/memoryUsage.cxx +++ b/panda/src/express/memoryUsage.cxx @@ -12,9 +12,6 @@ */ #include "memoryUsage.h" - -#ifdef DO_MEMORY_USAGE - #include "memoryUsagePointers.h" #include "trueClock.h" #include "typedReferenceCount.h" @@ -45,16 +42,17 @@ double MemoryUsage::AgeHistogram::_cutoff[MemoryUsage::AgeHistogram::num_buckets 60.0, }; - /** * Adds a single entry to the histogram. */ void MemoryUsage::TypeHistogram:: add_info(TypeHandle type, MemoryInfo *info) { +#ifdef DO_MEMORY_USAGE _counts[type].add_info(info); +#endif } - +#ifdef DO_MEMORY_USAGE // This class is a temporary class used only in TypeHistogram::show(), below, // to sort the types in descending order by counts. class TypeHistogramCountSorter { @@ -71,12 +69,14 @@ public: MemoryUsagePointerCounts _count; TypeHandle _type; }; +#endif /** * Shows the contents of the histogram to nout. */ void MemoryUsage::TypeHistogram:: show() const { +#ifdef DO_MEMORY_USAGE // First, copy the relevant information to a vector so we can sort by // counts. Don't use a pvector. typedef vector CountSorter; @@ -99,6 +99,7 @@ show() const { } nout << " : " << (*vi)._count << "\n"; } +#endif } /** @@ -122,9 +123,11 @@ AgeHistogram() { */ void MemoryUsage::AgeHistogram:: add_info(double age, MemoryInfo *info) { +#ifdef DO_MEMORY_USAGE int bucket = choose_bucket(age); nassertv(bucket >= 0 && bucket < num_buckets); _counts[bucket].add_info(info); +#endif } /** @@ -132,6 +135,7 @@ add_info(double age, MemoryInfo *info) { */ void MemoryUsage::AgeHistogram:: show() const { +#ifdef DO_MEMORY_USAGE for (int i = 0; i < num_buckets - 1; i++) { nout << _cutoff[i] << " to " << _cutoff[i + 1] << " seconds old : "; _counts[i].output(nout); @@ -140,6 +144,7 @@ show() const { nout << _cutoff[num_buckets - 1] << " seconds old and up : "; _counts[num_buckets - 1].output(nout); nout << "\n"; +#endif } /** @@ -147,9 +152,11 @@ show() const { */ void MemoryUsage::AgeHistogram:: clear() { +#ifdef DO_MEMORY_USAGE for (int i = 0; i < num_buckets; i++) { _counts[i].clear(); } +#endif } /** @@ -157,6 +164,7 @@ clear() { */ int MemoryUsage::AgeHistogram:: choose_bucket(double age) const { +#ifdef DO_MEMORY_USAGE for (int i = num_buckets - 1; i >= 0; i--) { if (age >= _cutoff[i]) { return i; @@ -164,6 +172,7 @@ choose_bucket(double age) const { } express_cat.error() << "No suitable bucket for age " << age << "\n"; +#endif return 0; } @@ -173,6 +182,7 @@ choose_bucket(double age) const { */ void *MemoryUsage:: heap_alloc_single(size_t size) { +#ifdef DO_MEMORY_USAGE void *ptr; if (_recursion_protect) { @@ -202,6 +212,9 @@ heap_alloc_single(size_t size) { } return ptr; +#else + return MemoryHook::heap_alloc_single(size); +#endif } /** @@ -209,6 +222,7 @@ heap_alloc_single(size_t size) { */ void MemoryUsage:: heap_free_single(void *ptr) { +#ifdef DO_MEMORY_USAGE if (_recursion_protect) { if (express_cat.is_spam()) { express_cat.spam() @@ -231,6 +245,9 @@ heap_free_single(void *ptr) { MemoryHook::heap_free_single(ptr); } } +#else + MemoryHook::heap_free_single(ptr); +#endif } /** @@ -239,6 +256,7 @@ heap_free_single(void *ptr) { */ void *MemoryUsage:: heap_alloc_array(size_t size) { +#ifdef DO_MEMORY_USAGE void *ptr; if (_recursion_protect) { @@ -268,6 +286,9 @@ heap_alloc_array(size_t size) { } return ptr; +#else + return MemoryHook::heap_alloc_array(size); +#endif } /** @@ -275,6 +296,7 @@ heap_alloc_array(size_t size) { */ void *MemoryUsage:: heap_realloc_array(void *ptr, size_t size) { +#ifdef DO_MEMORY_USAGE if (_recursion_protect) { ptr = MemoryHook::heap_realloc_array(ptr, size); if (express_cat.is_spam()) { @@ -303,6 +325,9 @@ heap_realloc_array(void *ptr, size_t size) { } return ptr; +#else + return MemoryHook::heap_realloc_array(ptr, size); +#endif } /** @@ -310,6 +335,7 @@ heap_realloc_array(void *ptr, size_t size) { */ void MemoryUsage:: heap_free_array(void *ptr) { +#ifdef DO_MEMORY_USAGE if (_recursion_protect) { if (express_cat.is_spam()) { express_cat.spam() @@ -332,6 +358,9 @@ heap_free_array(void *ptr) { MemoryHook::heap_free_array(ptr); } } +#else + MemoryHook::heap_free_array(ptr); +#endif } /** @@ -343,6 +372,7 @@ heap_free_array(void *ptr) { */ void MemoryUsage:: mark_pointer(void *ptr, size_t size, ReferenceCount *ref_ptr) { +#ifdef DO_MEMORY_USAGE if (_recursion_protect || !_track_memory_usage) { return; } @@ -391,6 +421,7 @@ mark_pointer(void *ptr, size_t size, ReferenceCount *ref_ptr) { // We're removing this pointer from use. ns_remove_void_pointer(ptr); } +#endif } #if (defined(WIN32_VC) || defined (WIN64_VC))&& defined(_DEBUG) @@ -430,7 +461,23 @@ win32_malloc_hook(int alloc_type, void *ptr, * */ MemoryUsage:: -MemoryUsage(const MemoryHook ©) : MemoryHook(copy) { +MemoryUsage(const MemoryHook ©) : + MemoryHook(copy), + _info_set_dirty(false), + _freeze_index(0), + _count(0), + _current_cpp_size(0), + _total_cpp_size(0), + _total_size(0), + + _track_memory_usage(false), + _startup_track_memory_usage(false), + _count_memory_usage(false), + _report_memory_usage(false), + _report_memory_interval(0.0), + _last_report_time(0.0) { + +#ifdef DO_MEMORY_USAGE // We must get these variables here instead of in config_express.cxx, // because we need to know it at static init time, and who knows when the // code in config_express will be executed. @@ -456,9 +503,6 @@ MemoryUsage(const MemoryHook ©) : MemoryHook(copy) { ("report-memory-interval", 5.0, PRC_DESC("This is the interval, in seconds, for reports of currently allocated " "memory, when report-memory-usage is true.")); - _last_report_time = 0.0; - - _count_memory_usage = false; int64_t max_heap_size = ConfigVariableInt64 ("max-heap-size", 0, @@ -480,13 +524,7 @@ MemoryUsage(const MemoryHook ©) : MemoryHook(copy) { _CrtSetAllocHook(&win32_malloc_hook); _count_memory_usage = true; #endif - - _info_set_dirty = false; - _freeze_index = 0; - _count = 0; - _current_cpp_size = 0; - _total_cpp_size = 0; - _total_size = 0; +#endif // DO_MEMORY_USAGE } /** @@ -494,9 +532,16 @@ MemoryUsage(const MemoryHook ©) : MemoryHook(copy) { */ void MemoryUsage:: init_memory_usage() { +#ifdef DO_MEMORY_USAGE init_memory_hook(); _global_ptr = new MemoryUsage(*memory_hook); memory_hook = _global_ptr; +#else + // If this gets called, we still need to initialize the global_ptr with a + // stub even if we don't compile with memory usage tracking enabled, for ABI + // stability. However, we won't replace the memory hook. + _global_ptr = new MemoryUsage(*memory_hook); +#endif } /** @@ -507,6 +552,7 @@ init_memory_usage() { */ void MemoryUsage:: overflow_heap_size() { +#ifdef DO_MEMORY_USAGE MemoryHook::overflow_heap_size(); express_cat.error() @@ -524,6 +570,7 @@ overflow_heap_size() { // Turn on spamful debugging. _track_memory_usage = true; _report_memory_usage = true; +#endif } /** @@ -531,12 +578,13 @@ overflow_heap_size() { */ void MemoryUsage:: ns_record_pointer(ReferenceCount *ptr) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { // We have to protect modifications to the table from recursive calls by // toggling _recursion_protect while we adjust it. _recursion_protect = true; pair insert_result = - _table.insert(Table::value_type((void *)ptr, (MemoryInfo *)NULL)); + _table.insert(Table::value_type((void *)ptr, nullptr)); // This shouldn't fail. assert(insert_result.first != _table.end()); @@ -575,6 +623,61 @@ ns_record_pointer(ReferenceCount *ptr) { } } } +#endif +} + + +/** + * Indicates that the given pointer has been recently allocated. + */ +void MemoryUsage:: +ns_record_pointer(void *ptr, TypeHandle type) { +#ifdef DO_MEMORY_USAGE + if (_track_memory_usage) { + // We have to protect modifications to the table from recursive calls by + // toggling _recursion_protect while we adjust it. + _recursion_protect = true; + pair insert_result = + _table.insert(Table::value_type(ptr, nullptr)); + + // This shouldn't fail. + assert(insert_result.first != _table.end()); + + if (insert_result.second) { + (*insert_result.first).second = new MemoryInfo; + _info_set_dirty = true; + ++_count; + } + + MemoryInfo *info = (*insert_result.first).second; + + // We should already have a pointer, thanks to a previous call to + // mark_pointer(). + nassertv(info->_void_ptr == ptr && info->_ref_ptr == nullptr); + + info->_void_ptr = ptr; + info->_static_type = type; + info->_dynamic_type = type; + info->_time = TrueClock::get_global_ptr()->get_long_time(); + info->_freeze_index = _freeze_index; + info->_flags |= MemoryInfo::F_reconsider_dynamic_type; + + // We close the recursion_protect flag all the way down here, so that we + // also protect ourselves against a possible recursive call in + // TrueClock::get_global_ptr(). + _recursion_protect = false; + + if (_report_memory_usage) { + double now = TrueClock::get_global_ptr()->get_long_time(); + if (now - _last_report_time > _report_memory_interval) { + _last_report_time = now; + express_cat.info() + << "*** Current memory usage: " << get_total_size() << "\n"; + show_current_types(); + } + } + } +#endif } /** @@ -584,7 +687,8 @@ ns_record_pointer(ReferenceCount *ptr) { * only that it's a "ReferenceCount". */ void MemoryUsage:: -ns_update_type(ReferenceCount *ptr, TypeHandle type) { +ns_update_type(void *ptr, TypeHandle type) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { Table::iterator ti; ti = _table.find(ptr); @@ -592,7 +696,7 @@ ns_update_type(ReferenceCount *ptr, TypeHandle type) { if (_startup_track_memory_usage) { express_cat.error() << "Attempt to update type to " << type << " for unrecorded pointer " - << (void *)ptr << "!\n"; + << ptr << "!\n"; nassertv(false); } return; @@ -605,6 +709,7 @@ ns_update_type(ReferenceCount *ptr, TypeHandle type) { consolidate_void_ptr(info); } +#endif } /** @@ -614,7 +719,8 @@ ns_update_type(ReferenceCount *ptr, TypeHandle type) { * the pointer as a TypedObject it doesn't need any more help. */ void MemoryUsage:: -ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { +ns_update_type(void *ptr, TypedObject *typed_ptr) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { Table::iterator ti; ti = _table.find(ptr); @@ -623,7 +729,7 @@ ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { express_cat.error() << "Attempt to update type to " << typed_ptr->get_type() << " for unrecorded pointer " - << (void *)ptr << "!\n"; + << ptr << "!\n"; } return; } @@ -634,6 +740,7 @@ ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { consolidate_void_ptr(info); } +#endif } /** @@ -641,6 +748,7 @@ ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr) { */ void MemoryUsage:: ns_remove_pointer(ReferenceCount *ptr) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { Table::iterator ti; ti = _table.find(ptr); @@ -705,6 +813,7 @@ ns_remove_pointer(ReferenceCount *ptr) { } } } +#endif } /** @@ -713,6 +822,7 @@ ns_remove_pointer(ReferenceCount *ptr) { */ void MemoryUsage:: ns_record_void_pointer(void *ptr, size_t size) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { if (express_cat.is_spam()) { express_cat.spam() @@ -724,7 +834,7 @@ ns_record_void_pointer(void *ptr, size_t size) { _recursion_protect = true; pair insert_result = - _table.insert(Table::value_type((void *)ptr, (MemoryInfo *)NULL)); + _table.insert(Table::value_type((void *)ptr, nullptr)); assert(insert_result.first != _table.end()); @@ -761,6 +871,7 @@ ns_record_void_pointer(void *ptr, size_t size) { // TrueClock::get_global_ptr(). _recursion_protect = false; } +#endif } /** @@ -768,6 +879,7 @@ ns_record_void_pointer(void *ptr, size_t size) { */ void MemoryUsage:: ns_remove_void_pointer(void *ptr) { +#ifdef DO_MEMORY_USAGE if (_track_memory_usage) { if (express_cat.is_spam()) { express_cat.spam() @@ -823,6 +935,7 @@ ns_remove_void_pointer(void *ptr) { _info_set_dirty = true; delete info; } +#endif } /** @@ -830,8 +943,12 @@ ns_remove_void_pointer(void *ptr) { */ int MemoryUsage:: ns_get_num_pointers() { +#ifdef DO_MEMORY_USAGE nassertr(_track_memory_usage, 0); return _count; +#else + return 0; +#endif } /** @@ -840,6 +957,7 @@ ns_get_num_pointers() { */ void MemoryUsage:: ns_get_pointers(MemoryUsagePointers &result) { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); result.clear(); @@ -857,6 +975,7 @@ ns_get_pointers(MemoryUsagePointers &result) { now - info->_time); } } +#endif } /** @@ -865,6 +984,7 @@ ns_get_pointers(MemoryUsagePointers &result) { */ void MemoryUsage:: ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); result.clear(); @@ -886,6 +1006,7 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { } } } +#endif } /** @@ -895,6 +1016,7 @@ ns_get_pointers_of_type(MemoryUsagePointers &result, TypeHandle type) { void MemoryUsage:: ns_get_pointers_of_age(MemoryUsagePointers &result, double from, double to) { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); result.clear(); @@ -915,6 +1037,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result, } } } +#endif } /** @@ -935,6 +1058,7 @@ ns_get_pointers_of_age(MemoryUsagePointers &result, */ void MemoryUsage:: ns_get_pointers_with_zero_count(MemoryUsagePointers &result) { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); result.clear(); @@ -955,6 +1079,7 @@ ns_get_pointers_with_zero_count(MemoryUsagePointers &result) { } } } +#endif } /** @@ -965,11 +1090,13 @@ ns_get_pointers_with_zero_count(MemoryUsagePointers &result) { */ void MemoryUsage:: ns_freeze() { +#ifdef DO_MEMORY_USAGE _count = 0; _current_cpp_size = 0; _trend_types.clear(); _trend_ages.clear(); _freeze_index++; +#endif } /** @@ -977,6 +1104,7 @@ ns_freeze() { */ void MemoryUsage:: ns_show_current_types() { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); TypeHistogram hist; @@ -994,6 +1122,7 @@ ns_show_current_types() { } hist.show(); _recursion_protect = false; +#endif } /** @@ -1002,7 +1131,9 @@ ns_show_current_types() { */ void MemoryUsage:: ns_show_trend_types() { +#ifdef DO_MEMORY_USAGE _trend_types.show(); +#endif } /** @@ -1010,6 +1141,7 @@ ns_show_trend_types() { */ void MemoryUsage:: ns_show_current_ages() { +#ifdef DO_MEMORY_USAGE nassertv(_track_memory_usage); AgeHistogram hist; @@ -1026,6 +1158,7 @@ ns_show_current_ages() { hist.show(); _recursion_protect = false; +#endif } /** @@ -1037,6 +1170,8 @@ ns_show_trend_ages() { _trend_ages.show(); } +#ifdef DO_MEMORY_USAGE + /** * If the size information has not yet been determined for this pointer, * checks to see if it has possibly been recorded under the TypedObject @@ -1126,5 +1261,4 @@ refresh_info_set() { _info_set_dirty = false; } - #endif // DO_MEMORY_USAGE diff --git a/panda/src/express/memoryUsage.h b/panda/src/express/memoryUsage.h index eb4cc6856e..87fc4f59d8 100644 --- a/panda/src/express/memoryUsage.h +++ b/panda/src/express/memoryUsage.h @@ -15,9 +15,6 @@ #define MEMORYUSAGE_H #include "pandabase.h" - -#ifdef DO_MEMORY_USAGE - #include "typedObject.h" #include "memoryInfo.h" #include "memoryUsagePointerCounts.h" @@ -33,18 +30,22 @@ class MemoryUsagePointers; * every such object currently allocated. * * When compiled with NDEBUG set, this entire class does nothing and compiles - * to nothing. + * to a stub. */ class EXPCL_PANDAEXPRESS MemoryUsage : public MemoryHook { public: - INLINE static bool get_track_memory_usage(); + ALWAYS_INLINE static bool get_track_memory_usage(); INLINE static void record_pointer(ReferenceCount *ptr); + INLINE static void record_pointer(void *ptr, TypeHandle type); INLINE static void update_type(ReferenceCount *ptr, TypeHandle type); INLINE static void update_type(ReferenceCount *ptr, TypedObject *typed_ptr); + INLINE static void update_type(void *ptr, TypeHandle type); INLINE static void remove_pointer(ReferenceCount *ptr); -public: +protected: + // These are not marked public, but they can be accessed via the MemoryHook + // base class. virtual void *heap_alloc_single(size_t size); virtual void heap_free_single(void *ptr); @@ -98,8 +99,9 @@ private: static void init_memory_usage(); void ns_record_pointer(ReferenceCount *ptr); - void ns_update_type(ReferenceCount *ptr, TypeHandle type); - void ns_update_type(ReferenceCount *ptr, TypedObject *typed_ptr); + void ns_record_pointer(void *ptr, TypeHandle type); + void ns_update_type(void *ptr, TypeHandle type); + void ns_update_type(void *ptr, TypedObject *typed_ptr); void ns_remove_pointer(ReferenceCount *ptr); void ns_record_void_pointer(void *ptr, size_t size); @@ -120,8 +122,10 @@ private: void ns_show_current_ages(); void ns_show_trend_ages(); +#ifdef DO_MEMORY_USAGE void consolidate_void_ptr(MemoryInfo *info); void refresh_info_set(); +#endif static MemoryUsage *_global_ptr; @@ -196,6 +200,4 @@ private: #include "memoryUsage.I" -#endif // DO_MEMORY_USAGE - #endif diff --git a/panda/src/express/memoryUsagePointerCounts.cxx b/panda/src/express/memoryUsagePointerCounts.cxx index d218d57589..b91be61bcc 100644 --- a/panda/src/express/memoryUsagePointerCounts.cxx +++ b/panda/src/express/memoryUsagePointerCounts.cxx @@ -12,9 +12,6 @@ */ #include "memoryUsagePointerCounts.h" - -#ifdef DO_MEMORY_USAGE - #include "memoryInfo.h" /** @@ -22,6 +19,7 @@ */ void MemoryUsagePointerCounts:: add_info(MemoryInfo *info) { +#ifdef DO_MEMORY_USAGE _count++; if (info->is_size_known()) { @@ -29,6 +27,7 @@ add_info(MemoryInfo *info) { } else { _unknown_size_count++; } +#endif } /** @@ -36,6 +35,7 @@ add_info(MemoryInfo *info) { */ void MemoryUsagePointerCounts:: output(ostream &out) const { +#ifdef DO_MEMORY_USAGE out << _count << " pointers"; if (_unknown_size_count < _count) { out << ", "; @@ -48,6 +48,7 @@ output(ostream &out) const { out << " (" << _unknown_size_count << " of unknown size)"; } } +#endif } /** @@ -56,6 +57,7 @@ output(ostream &out) const { */ void MemoryUsagePointerCounts:: output_bytes(ostream &out, size_t size) { +#ifdef DO_MEMORY_USAGE if (size < 4 * 1024) { out << size << " bytes"; @@ -65,6 +67,5 @@ output_bytes(ostream &out, size_t size) { } else { out << size / (1024 * 1024) << " Mb"; } +#endif } - -#endif // DO_MEMORY_USAGE diff --git a/panda/src/express/memoryUsagePointerCounts.h b/panda/src/express/memoryUsagePointerCounts.h index 935538fdee..2d95052ad8 100644 --- a/panda/src/express/memoryUsagePointerCounts.h +++ b/panda/src/express/memoryUsagePointerCounts.h @@ -16,8 +16,6 @@ #include "pandabase.h" -#ifdef DO_MEMORY_USAGE - class MemoryInfo; /** @@ -55,6 +53,4 @@ INLINE ostream &operator << (ostream &out, const MemoryUsagePointerCounts &c); #include "memoryUsagePointerCounts.I" -#endif // DO_MEMORY_USAGE - #endif diff --git a/panda/src/express/memoryUsagePointers.cxx b/panda/src/express/memoryUsagePointers.cxx index fff8199c5a..dd412958da 100644 --- a/panda/src/express/memoryUsagePointers.cxx +++ b/panda/src/express/memoryUsagePointers.cxx @@ -12,9 +12,6 @@ */ #include "memoryUsagePointers.h" - -#ifdef DO_MEMORY_USAGE - #include "config_express.h" #include "referenceCount.h" #include "typedReferenceCount.h" @@ -38,7 +35,11 @@ MemoryUsagePointers:: */ size_t MemoryUsagePointers:: get_num_pointers() const { +#ifdef DO_MEMORY_USAGE return _entries.size(); +#else + return 0; +#endif } /** @@ -46,21 +47,26 @@ get_num_pointers() const { */ ReferenceCount *MemoryUsagePointers:: get_pointer(size_t n) const { - nassertr(n < get_num_pointers(), NULL); +#ifdef DO_MEMORY_USAGE + nassertr(n < get_num_pointers(), nullptr); return _entries[n]._ref_ptr; +#else + return nullptr; +#endif } /** * Returns the nth pointer of the set, typecast to a TypedObject if possible. * If the pointer is not a TypedObject or if the cast cannot be made, returns - * NULL. + * nullptr. */ TypedObject *MemoryUsagePointers:: get_typed_pointer(size_t n) const { - nassertr(n < get_num_pointers(), NULL); +#ifdef DO_MEMORY_USAGE + nassertr(n < get_num_pointers(), nullptr); TypedObject *typed_ptr = _entries[n]._typed_ptr; - if (typed_ptr != (TypedObject *)NULL) { + if (typed_ptr != nullptr) { return typed_ptr; } @@ -85,7 +91,8 @@ get_typed_pointer(size_t n) const { type.is_derived_from(TypedReferenceCount::get_class_type())) { return (TypedReferenceCount *)ref_ptr; } - return NULL; +#endif + return nullptr; } /** @@ -93,8 +100,12 @@ get_typed_pointer(size_t n) const { */ TypeHandle MemoryUsagePointers:: get_type(size_t n) const { +#ifdef DO_MEMORY_USAGE nassertr(n < get_num_pointers(), TypeHandle::none()); return _entries[n]._type; +#else + return TypeHandle::none(); +#endif } /** @@ -102,8 +113,12 @@ get_type(size_t n) const { */ string MemoryUsagePointers:: get_type_name(size_t n) const { +#ifdef DO_MEMORY_USAGE nassertr(n < get_num_pointers(), ""); return get_type(n).get_name(); +#else + return ""; +#endif } /** @@ -113,8 +128,12 @@ get_type_name(size_t n) const { */ double MemoryUsagePointers:: get_age(size_t n) const { +#ifdef DO_MEMORY_USAGE nassertr(n < get_num_pointers(), 0.0); return _entries[n]._age; +#else + return 0.0; +#endif } /** @@ -122,7 +141,9 @@ get_age(size_t n) const { */ void MemoryUsagePointers:: clear() { +#ifdef DO_MEMORY_USAGE _entries.clear(); +#endif } /** @@ -130,7 +151,9 @@ clear() { */ void MemoryUsagePointers:: output(ostream &out) const { +#ifdef DO_MEMORY_USAGE out << _entries.size() << " pointers."; +#endif } /** @@ -139,13 +162,12 @@ output(ostream &out) const { void MemoryUsagePointers:: add_entry(ReferenceCount *ref_ptr, TypedObject *typed_ptr, TypeHandle type, double age) { +#ifdef DO_MEMORY_USAGE // We can't safely add pointers with a zero reference count. They might be // statically-allocated or something, and if we try to add them they'll try // to destruct when the PointerTo later goes away. if (ref_ptr->get_ref_count() != 0) { _entries.push_back(Entry(ref_ptr, typed_ptr, type, age)); } +#endif } - - -#endif // DO_MEMORY_USAGE diff --git a/panda/src/express/memoryUsagePointers.h b/panda/src/express/memoryUsagePointers.h index 317910760b..344c2edc6b 100644 --- a/panda/src/express/memoryUsagePointers.h +++ b/panda/src/express/memoryUsagePointers.h @@ -15,9 +15,6 @@ #define MEMORYUSAGEPOINTERS_H #include "pandabase.h" - -#ifdef DO_MEMORY_USAGE - #include "typedObject.h" #include "pointerTo.h" #include "referenceCount.h" @@ -53,7 +50,9 @@ PUBLISHED: string get_type_name(size_t n) const; double get_age(size_t n) const; +#ifdef DO_MEMORY_USAGE EXTENSION(PyObject *get_python_pointer(size_t n) const); +#endif void clear(); @@ -94,6 +93,4 @@ INLINE ostream &operator << (ostream &out, const MemoryUsagePointers &mup) { #include "memoryUsagePointers.I" -#endif // MEMORY_USAGE_POINTERS - #endif diff --git a/panda/src/express/pointerToBase.I b/panda/src/express/pointerToBase.I index d57064967b..bf4ff877f0 100644 --- a/panda/src/express/pointerToBase.I +++ b/panda/src/express/pointerToBase.I @@ -141,7 +141,6 @@ reassign(const PointerToBase ©) { } } -#ifdef DO_MEMORY_USAGE /** * Ensures that the MemoryUsage record for the pointer has the right type of * object, if we know the type ourselves. @@ -149,6 +148,7 @@ reassign(const PointerToBase ©) { template INLINE void PointerToBase:: update_type(To *ptr) { +#ifdef DO_MEMORY_USAGE if (MemoryUsage::get_track_memory_usage()) { TypeHandle type = get_type_handle(To); if (type == TypeHandle::none()) { @@ -159,9 +159,8 @@ update_type(To *ptr) { MemoryUsage::update_type(ptr, type); } } -} #endif // DO_MEMORY_USAGE - +} /** * A convenient way to set the PointerTo object to NULL. (Assignment to a NULL diff --git a/panda/src/express/pointerToBase.h b/panda/src/express/pointerToBase.h index 7d5524f2b9..919f596c33 100644 --- a/panda/src/express/pointerToBase.h +++ b/panda/src/express/pointerToBase.h @@ -44,9 +44,7 @@ protected: INLINE void reassign(To *ptr); INLINE void reassign(const PointerToBase ©); -#ifdef DO_MEMORY_USAGE INLINE void update_type(To *ptr); -#endif // DO_MEMORY_USAGE // No assignment or retrieval functions are declared in PointerToBase, // because we will have to specialize on const vs. non-const later. diff --git a/panda/src/express/threadSafePointerToBase.I b/panda/src/express/threadSafePointerToBase.I index db8166b78a..4d200a483a 100644 --- a/panda/src/express/threadSafePointerToBase.I +++ b/panda/src/express/threadSafePointerToBase.I @@ -89,7 +89,6 @@ reassign(const ThreadSafePointerToBase ©) { reassign((To *)copy._void_ptr); } -#ifdef DO_MEMORY_USAGE /** * Ensures that the MemoryUsage record for the pointer has the right type of * object, if we know the type ourselves. @@ -97,6 +96,7 @@ reassign(const ThreadSafePointerToBase ©) { template void ThreadSafePointerToBase:: update_type(To *ptr) { +#ifdef DO_MEMORY_USAGE TypeHandle type = get_type_handle(To); if (type == TypeHandle::none()) { do_init_type(To); @@ -105,9 +105,8 @@ update_type(To *ptr) { if (type != TypeHandle::none()) { MemoryUsage::update_type(ptr, type); } -} #endif // DO_MEMORY_USAGE - +} /** * A convenient way to set the ThreadSafePointerTo object to NULL. (Assignment diff --git a/panda/src/express/threadSafePointerToBase.h b/panda/src/express/threadSafePointerToBase.h index dedcfd08ab..78c6d75cca 100644 --- a/panda/src/express/threadSafePointerToBase.h +++ b/panda/src/express/threadSafePointerToBase.h @@ -40,9 +40,7 @@ protected: INLINE void reassign(To *ptr); INLINE void reassign(const ThreadSafePointerToBase ©); -#ifdef DO_MEMORY_USAGE void update_type(To *ptr); -#endif // DO_MEMORY_USAGE // No assignment or retrieval functions are declared in // ThreadSafePointerToBase, because we will have to specialize on const vs. diff --git a/panda/src/gobj/internalName.h b/panda/src/gobj/internalName.h index bc636eb1c9..eff928b668 100644 --- a/panda/src/gobj/internalName.h +++ b/panda/src/gobj/internalName.h @@ -178,11 +178,9 @@ private: static TypeHandle _texcoord_type_handle; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif INLINE ostream &operator << (ostream &out, const InternalName &tcn); diff --git a/panda/src/mathutil/geometricBoundingVolume.h b/panda/src/mathutil/geometricBoundingVolume.h index cc48177f17..a27c19a724 100644 --- a/panda/src/mathutil/geometricBoundingVolume.h +++ b/panda/src/mathutil/geometricBoundingVolume.h @@ -83,11 +83,9 @@ private: static TypeHandle _type_handle; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif #include "geometricBoundingVolume.I" diff --git a/panda/src/pgraph/cullPlanes.h b/panda/src/pgraph/cullPlanes.h index c091eebdc9..4b29fb7794 100644 --- a/panda/src/pgraph/cullPlanes.h +++ b/panda/src/pgraph/cullPlanes.h @@ -74,11 +74,9 @@ private: Occluders _occluders; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif #include "cullPlanes.I" diff --git a/panda/src/pgraph/cullableObject.I b/panda/src/pgraph/cullableObject.I index e93e826a58..e5e7229d09 100644 --- a/panda/src/pgraph/cullableObject.I +++ b/panda/src/pgraph/cullableObject.I @@ -17,7 +17,7 @@ INLINE CullableObject:: CullableObject() { #ifdef DO_MEMORY_USAGE - MemoryUsage::update_type(this, get_class_type()); + MemoryUsage::record_pointer(this, get_class_type()); #endif } @@ -33,7 +33,7 @@ CullableObject(CPT(Geom) geom, CPT(RenderState) state, _internal_transform(move(internal_transform)) { #ifdef DO_MEMORY_USAGE - MemoryUsage::update_type(this, get_class_type()); + MemoryUsage::record_pointer(this, get_class_type()); #endif } @@ -48,7 +48,7 @@ CullableObject(const CullableObject ©) : _internal_transform(copy._internal_transform) { #ifdef DO_MEMORY_USAGE - MemoryUsage::update_type(this, get_class_type()); + MemoryUsage::record_pointer(this, get_class_type()); #endif } diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index 1415052770..a8595da9f5 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/panda/src/pgraph/cullableObject.h @@ -21,7 +21,6 @@ #include "renderState.h" #include "transformState.h" #include "pointerTo.h" -#include "referenceCount.h" #include "geomNode.h" #include "cullTraverserData.h" #include "pStatCollector.h" @@ -39,11 +38,7 @@ class GeomMunger; * The smallest atom of cull. This is normally just a Geom and its associated * state, but it also contain a draw callback. */ -class EXPCL_PANDA_PGRAPH CullableObject -#ifdef DO_MEMORY_USAGE - : public ReferenceCount // We inherit from ReferenceCount just to get the memory type tracking that MemoryUsage provides. -#endif // DO_MEMORY_USAGE -{ +class EXPCL_PANDA_PGRAPH CullableObject { public: INLINE CullableObject(); INLINE CullableObject(CPT(Geom) geom, CPT(RenderState) state, @@ -124,13 +119,7 @@ public: return _type_handle; } static void init_type() { -#ifdef DO_MEMORY_USAGE - ReferenceCount::init_type(); - register_type(_type_handle, "CullableObject", - ReferenceCount::get_class_type()); -#else register_type(_type_handle, "CullableObject"); -#endif // DO_MEMORY_USAGE } private: diff --git a/panda/src/pgraph/nodePathComponent.h b/panda/src/pgraph/nodePathComponent.h index b0ed69a389..2106430b7d 100644 --- a/panda/src/pgraph/nodePathComponent.h +++ b/panda/src/pgraph/nodePathComponent.h @@ -125,11 +125,9 @@ private: friend class NodePath; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif INLINE ostream &operator << (ostream &out, const NodePathComponent &comp); diff --git a/panda/src/pgraph/pandaNode.h b/panda/src/pgraph/pandaNode.h index b55f160588..a0a2d0f9a3 100644 --- a/panda/src/pgraph/pandaNode.h +++ b/panda/src/pgraph/pandaNode.h @@ -907,11 +907,9 @@ private: }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif INLINE ostream &operator << (ostream &out, const PandaNode &node) { node.output(out); diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index f91f02cd3e..a1b1813ea9 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -368,11 +368,9 @@ private: friend class Extension; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif INLINE ostream &operator << (ostream &out, const RenderState &state) { state.output(out); diff --git a/panda/src/pgraph/transformState.h b/panda/src/pgraph/transformState.h index 3fd628be7c..b4efd5abf3 100644 --- a/panda/src/pgraph/transformState.h +++ b/panda/src/pgraph/transformState.h @@ -406,11 +406,9 @@ private: friend class Extension; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif INLINE ostream &operator << (ostream &out, const TransformState &state) { state.output(out); diff --git a/panda/src/putil/copyOnWriteObject.h b/panda/src/putil/copyOnWriteObject.h index 37302ea44a..2f6b5cc9fc 100644 --- a/panda/src/putil/copyOnWriteObject.h +++ b/panda/src/putil/copyOnWriteObject.h @@ -161,11 +161,9 @@ private: static TypeHandle _type_handle; }; -#ifdef DO_MEMORY_USAGE // We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif #include "copyOnWriteObject.I" diff --git a/panda/src/putil/typedWritableReferenceCount.h b/panda/src/putil/typedWritableReferenceCount.h index 51803d7b36..69fabf86ee 100644 --- a/panda/src/putil/typedWritableReferenceCount.h +++ b/panda/src/putil/typedWritableReferenceCount.h @@ -61,10 +61,9 @@ private: static TypeHandle _type_handle; }; -#ifdef DO_MEMORY_USAGE +// We can safely redefine this as a no-op. template<> INLINE void PointerToBase::update_type(To *ptr) {} -#endif #include "typedWritableReferenceCount.I" From 8b3ad7348e41db4f63a9471bb32eff39376e6346 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 19:53:53 +0200 Subject: [PATCH 18/36] cocoa: fix broken mouse events in fullscreen on macOS (LP 1500026) --- panda/src/cocoadisplay/cocoaGraphicsWindow.mm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm index 6de003d2aa..ebc9255d63 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm @@ -277,7 +277,21 @@ process_events() { break; } - [NSApp sendEvent: event]; + // If we're in fullscreen mode, send mouse events directly to the window. + NSEventType type = [event type]; + if (_properties.get_fullscreen() && ( + type == NSLeftMouseDown || type == NSLeftMouseUp || + type == NSRightMouseDown || type == NSRightMouseUp || + type == NSOtherMouseDown || type == NSOtherMouseUp || + type == NSLeftMouseDragged || + type == NSRightMouseDragged || + type == NSOtherMouseDragged || + type == NSMouseMoved || + type == NSScrollWheel)) { + [_window sendEvent: event]; + } else { + [NSApp sendEvent: event]; + } } if (_window != nil) { From 1b690e528fdea15c7290e015f3ec14fa03e69c6c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 21:10:47 +0200 Subject: [PATCH 19/36] vfs: don't crash if copy_file can't open output file (LP 1687283) --- panda/src/express/virtualFileSimple.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/panda/src/express/virtualFileSimple.cxx b/panda/src/express/virtualFileSimple.cxx index a036c0df4b..1c521b6459 100644 --- a/panda/src/express/virtualFileSimple.cxx +++ b/panda/src/express/virtualFileSimple.cxx @@ -150,7 +150,16 @@ copy_file(VirtualFile *new_file) { // Different mount point, or the mount doesn't support copying. Do it by // hand. ostream *out = new_file->open_write_file(false, true); + if (out == nullptr) { + return false; + } + istream *in = open_read_file(false); + if (in == nullptr) { + new_file->close_write_file(out); + new_file->delete_file(); + return false; + } static const size_t buffer_size = 4096; char buffer[buffer_size]; From f79fbf25c3370554cf57451b12097a12356f7270 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 10 Jul 2017 21:54:43 +0200 Subject: [PATCH 20/36] ShaderGenerator: big overhaul, don't generate more shaders than needed --- panda/src/display/graphicsStateGuardian.cxx | 91 +- panda/src/display/standardMunger.cxx | 11 +- panda/src/gobj/material.I | 8 + panda/src/gobj/material.h | 4 +- panda/src/gobj/shader.cxx | 117 +- panda/src/gobj/shader.h | 11 + panda/src/pgraph/alphaTestAttrib.cxx | 16 - panda/src/pgraph/alphaTestAttrib.h | 1 - panda/src/pgraph/auxBitplaneAttrib.cxx | 8 - panda/src/pgraph/auxBitplaneAttrib.h | 1 - panda/src/pgraph/clipPlaneAttrib.cxx | 8 - panda/src/pgraph/clipPlaneAttrib.h | 1 - panda/src/pgraph/colorAttrib.cxx | 13 - panda/src/pgraph/colorAttrib.h | 1 - panda/src/pgraph/colorBlendAttrib.cxx | 8 - panda/src/pgraph/colorBlendAttrib.h | 1 - panda/src/pgraph/colorScaleAttrib.cxx | 11 - panda/src/pgraph/colorScaleAttrib.h | 1 - panda/src/pgraph/cullableObject.cxx | 10 +- panda/src/pgraph/cullableObject.h | 1 + panda/src/pgraph/fogAttrib.cxx | 8 - panda/src/pgraph/fogAttrib.h | 1 - panda/src/pgraph/lightAttrib.cxx | 8 - panda/src/pgraph/lightAttrib.h | 1 - panda/src/pgraph/lightRampAttrib.cxx | 8 - panda/src/pgraph/lightRampAttrib.h | 1 - panda/src/pgraph/logicOpAttrib.cxx | 8 - panda/src/pgraph/logicOpAttrib.h | 1 - panda/src/pgraph/materialAttrib.I | 12 +- panda/src/pgraph/materialAttrib.cxx | 57 +- panda/src/pgraph/materialAttrib.h | 5 - panda/src/pgraph/renderAttrib.I | 19 - panda/src/pgraph/renderAttrib.cxx | 8 - panda/src/pgraph/renderAttrib.h | 2 - panda/src/pgraph/renderState.cxx | 84 -- panda/src/pgraph/renderState.h | 6 - panda/src/pgraph/rescaleNormalAttrib.cxx | 16 - panda/src/pgraph/rescaleNormalAttrib.h | 1 - panda/src/pgraph/shaderAttrib.cxx | 20 - panda/src/pgraph/shaderAttrib.h | 1 - panda/src/pgraph/texGenAttrib.cxx | 8 - panda/src/pgraph/texGenAttrib.h | 1 - panda/src/pgraph/texMatrixAttrib.cxx | 22 - panda/src/pgraph/texMatrixAttrib.h | 1 - panda/src/pgraph/textureAttrib.I | 42 +- panda/src/pgraph/textureAttrib.cxx | 80 +- panda/src/pgraph/textureAttrib.h | 9 - panda/src/pgraph/transparencyAttrib.cxx | 15 - panda/src/pgraph/transparencyAttrib.h | 1 - panda/src/pgraphnodes/directionalLight.cxx | 5 +- panda/src/pgraphnodes/directionalLight.h | 2 - panda/src/pgraphnodes/lightLensNode.I | 9 + panda/src/pgraphnodes/lightLensNode.cxx | 2 + panda/src/pgraphnodes/lightLensNode.h | 3 + panda/src/pgraphnodes/pointLight.cxx | 5 +- panda/src/pgraphnodes/pointLight.h | 2 - panda/src/pgraphnodes/shaderGenerator.cxx | 1370 +++++++++++-------- panda/src/pgraphnodes/shaderGenerator.h | 106 +- panda/src/pgraphnodes/spotlight.cxx | 5 +- panda/src/pgraphnodes/spotlight.h | 2 - panda/src/pstatclient/pStatProperties.cxx | 2 +- 61 files changed, 1092 insertions(+), 1190 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 05126797a1..0d337a803e 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -44,6 +44,7 @@ #include "ambientLight.h" #include "directionalLight.h" #include "pointLight.h" +#include "sphereLight.h" #include "spotlight.h" #include "textureReloadRequest.h" #include "shaderAttrib.h" @@ -1122,6 +1123,28 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, return &LMatrix4::ident_mat(); } } + case Shader::SMO_texscale_i: { + const TexMatrixAttrib *tma; + const TextureAttrib *ta; + if (_target_rs->get_attrib(ta) && _target_rs->get_attrib(tma) && + index < ta->get_num_on_stages()) { + LVecBase3 scale = tma->get_transform(ta->get_on_stage(index))->get_scale(); + t = LMatrix4(0,0,0,0,0,0,0,0,0,0,0,0,scale[0],scale[1],scale[2],0); + return &t; + } else { + return &LMatrix4::ident_mat(); + } + } + case Shader::SMO_texcolor_i: { + const TextureAttrib *ta; + if (_target_rs->get_attrib(ta) && index < ta->get_num_on_stages()) { + TextureStage *ts = ta->get_on_stage(index); + t.set_row(3, ts->get_color()); + return &t; + } else { + return &LMatrix4::zeros_mat(); + } + } case Shader::SMO_tex_is_alpha_i: { // This is a hack so we can support both F_alpha and other formats in the // default shader, to fix font rendering in GLES2 @@ -1156,9 +1179,14 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, nassertr(!np.is_empty(), &LMatrix4::zeros_mat()); const PlaneNode *plane_node; DCAST_INTO_R(plane_node, np.node(), &LMatrix4::zeros_mat()); - LPlane p (plane_node->get_plane()); - p.xform(np.get_net_transform()->get_mat()); // World-space - t = LMatrix4(0,0,0,0,0,0,0,0,0,0,0,0,p[0],p[1],p[2],p[3]); + + // Transform plane to world space + CPT(TransformState) transform = np.get_net_transform(); + LPlane plane = plane_node->get_plane(); + if (!transform->is_identity()) { + plane.xform(transform->get_mat()); + } + t.set_row(3, plane); return &t; } case Shader::SMO_apiview_clipplane_i: { @@ -1195,7 +1223,6 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, } case Shader::SMO_world_to_view: { return &(_scene_setup->get_world_transform()->get_mat()); - break; } case Shader::SMO_view_to_world: { return &(_scene_setup->get_camera_transform()->get_mat()); @@ -1387,6 +1414,62 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, } return fetch_specified_member(NodePath(), name, t); } + case Shader::SMO_light_source_i_packed: { + // The light matrix contains COLOR, ATTENUATION, POSITION, VIEWVECTOR + const LightAttrib *target_light; + _target_rs->get_attrib_def(target_light); + + // We don't count ambient lights, which would be pretty silly to handle + // via this mechanism. + size_t num_lights = target_light->get_num_non_ambient_lights(); + if (index >= 0 && (size_t)index < num_lights) { + NodePath np = target_light->get_on_light((size_t)index); + nassertr(!np.is_empty(), &LMatrix4::ident_mat()); + PandaNode *node = np.node(); + Light *light = node->as_light(); + nassertr(light != nullptr, &LMatrix4::zeros_mat()); + t.set_row(0, light->get_color()); + t.set_row(1, light->get_attenuation()); + + LMatrix4 mat = np.get_net_transform()->get_mat() * + _scene_setup->get_world_transform()->get_mat(); + + if (node->is_of_type(DirectionalLight::get_class_type())) { + LVecBase3 d = mat.xform_vec(((const DirectionalLight *)node)->get_direction()); + d.normalize(); + t.set_row(2, LVecBase4(d, 0)); + t.set_row(3, LVecBase4(-d, 0)); + + } else if (node->is_of_type(LightLensNode::get_class_type())) { + const Lens *lens = ((const LightLensNode *)node)->get_lens(); + + LPoint3 p = mat.xform_point(lens->get_nodal_point()); + t.set_row(3, LVecBase4(p)); + + // For shadowed point light we need to store near/far. + // For spotlight we need to store cutoff angle. + if (node->is_of_type(Spotlight::get_class_type())) { + PN_stdfloat cutoff = ccos(deg_2_rad(lens->get_hfov() * 0.5f)); + LVecBase3 d = -(mat.xform_vec(lens->get_view_vector())); + t.set_cell(1, 3, ((const Spotlight *)node)->get_exponent()); + t.set_row(2, LVecBase4(d, cutoff)); + + } else if (node->is_of_type(PointLight::get_class_type())) { + t.set_cell(1, 3, lens->get_near()); + t.set_cell(3, 3, lens->get_far()); + + if (node->is_of_type(SphereLight::get_class_type())) { + t.set_cell(2, 3, ((const SphereLight *)node)->get_radius()); + } + } + } + } else if (index == 0) { + // Apply the default OpenGL lights otherwise. + // Special exception for light 0, which defaults to white. + t.set_row(0, _light_color_scale); + } + return &t; + } default: nassertr(false /*should never get here*/, &LMatrix4::ident_mat()); return &LMatrix4::ident_mat(); diff --git a/panda/src/display/standardMunger.cxx b/panda/src/display/standardMunger.cxx index 4b6aa01f67..1cb64189da 100644 --- a/panda/src/display/standardMunger.cxx +++ b/panda/src/display/standardMunger.cxx @@ -343,28 +343,29 @@ munge_state_impl(const RenderState *state) { #ifdef HAVE_CG if (_auto_shader) { - CPT(RenderState) shader_state = munged_state->get_auto_shader_state(); GraphicsStateGuardian *gsg = get_gsg(); ShaderGenerator *shader_generator = gsg->get_shader_generator(); if (shader_generator == nullptr) { shader_generator = new ShaderGenerator(gsg); gsg->set_shader_generator(shader_generator); } - if (shader_state->_generated_shader == NULL) { + if (munged_state->_generated_shader == nullptr) { // Cache the generated ShaderAttrib on the shader state. GeomVertexAnimationSpec spec; // Currently we overload this flag to request vertex animation for the // shader generator. const ShaderAttrib *sattr; - shader_state->get_attrib_def(sattr); + munged_state->get_attrib_def(sattr); if (sattr->get_flag(ShaderAttrib::F_hardware_skinning)) { spec.set_hardware(4, true); } - shader_state->_generated_shader = shader_generator->synthesize_shader(shader_state, spec); + munged_state->_generated_shader = shader_generator->synthesize_shader(munged_state, spec); + } + if (munged_state->_generated_shader != nullptr) { + munged_state = munged_state->set_attrib(munged_state->_generated_shader); } - munged_state = munged_state->set_attrib(shader_state->_generated_shader); } #endif diff --git a/panda/src/gobj/material.I b/panda/src/gobj/material.I index a408f2a0e4..777a555200 100644 --- a/panda/src/gobj/material.I +++ b/panda/src/gobj/material.I @@ -327,3 +327,11 @@ INLINE void Material:: set_attrib_lock() { _flags |= F_attrib_lock; } + +/** + * + */ +INLINE int Material:: +get_flags() const { + return _flags; +} diff --git a/panda/src/gobj/material.h b/panda/src/gobj/material.h index eb1a36747e..17344df46a 100644 --- a/panda/src/gobj/material.h +++ b/panda/src/gobj/material.h @@ -128,6 +128,8 @@ PUBLISHED: MAKE_PROPERTY(twoside, get_twoside, set_twoside); public: + INLINE int get_flags() const; + enum Flags { F_ambient = 0x001, F_diffuse = 0x002, @@ -157,8 +159,6 @@ private: int _flags; - friend class MaterialAttrib; - public: static void register_with_read_factory(); virtual void write_datagram(BamWriter *manager, Datagram &me); diff --git a/panda/src/gobj/shader.cxx b/panda/src/gobj/shader.cxx index 7147a108c0..d60e51838f 100644 --- a/panda/src/gobj/shader.cxx +++ b/panda/src/gobj/shader.cxx @@ -450,9 +450,11 @@ cp_dependency(ShaderMatInput inp) { } } if ((inp == SMO_light_ambient) || - (inp == SMO_light_source_i_attrib)) { - dep |= SSD_light; - if (inp == SMO_light_source_i_attrib) { + (inp == SMO_light_source_i_attrib) || + (inp == SMO_light_source_i_packed)) { + dep |= SSD_light | SSD_frame; + if (inp == SMO_light_source_i_attrib || + inp == SMO_light_source_i_packed) { dep |= SSD_view_transform; } } @@ -465,7 +467,7 @@ cp_dependency(ShaderMatInput inp) { (inp == SMO_apiview_clipplane_i)) { dep |= SSD_clip_planes; } - if (inp == SMO_texmat_i || inp == SMO_inv_texmat_i) { + if (inp == SMO_texmat_i || inp == SMO_inv_texmat_i || inp == SMO_texscale_i) { dep |= SSD_tex_matrix; } if ((inp == SMO_window_size) || @@ -483,7 +485,7 @@ cp_dependency(ShaderMatInput inp) { (inp == SMO_apiclip_to_apiview)) { dep |= SSD_projection; } - if (inp == SMO_tex_is_alpha_i) { + if (inp == SMO_tex_is_alpha_i || inp == SMO_texcolor_i) { dep |= SSD_texture | SSD_frame; } @@ -734,6 +736,29 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { return true; } + if (pieces[0] == "mat" && pieces[1] == "shadow") { + if ((!cp_errchk_parameter_words(p,3))|| + (!cp_errchk_parameter_in(p)) || + (!cp_errchk_parameter_uniform(p))|| + (!cp_errchk_parameter_float(p,16,16))) { + return false; + } + ShaderMatSpec bind; + bind._id = p._id; + bind._piece = SMP_whole; + bind._func = SMF_compose; + bind._part[1] = SMO_light_source_i_attrib; + bind._arg[1] = InternalName::make("shadowViewMatrix"); + bind._part[0] = SMO_view_to_apiview; + bind._arg[0] = NULL; + bind._index = atoi(pieces[2].c_str()); + + cp_optimize_mat_spec(bind); + _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; + return true; + } + // Implement some macros. Macros work by altering the contents of the // 'pieces' array, and then falling through. @@ -833,7 +858,13 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { ShaderMatSpec bind; bind._id = p._id; + bind._piece = SMP_whole; bind._func = SMF_compose; + bind._part[1] = SMO_light_source_i_attrib; + bind._arg[1] = InternalName::make("shadowViewMatrix"); + bind._part[0] = SMO_view_to_apiview; + bind._arg[0] = NULL; + bind._index = atoi(pieces[2].c_str()); int next = 1; pieces.push_back(""); @@ -958,6 +989,30 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { bind._arg[0] = NULL; bind._part[1] = SMO_identity; bind._arg[1] = NULL; + } else if (pieces[1].compare(0, 5, "light") == 0) { + if (!cp_errchk_parameter_float(p,16,16)) { + return false; + } + bind._id = p._id; + bind._piece = SMP_transpose; + bind._func = SMF_first; + bind._part[0] = SMO_light_source_i_packed; + bind._arg[0] = NULL; + bind._part[1] = SMO_identity; + bind._arg[1] = NULL; + bind._index = atoi(pieces[1].c_str() + 5); + } else if (pieces[1].compare(0, 5, "lspec") == 0) { + if (!cp_errchk_parameter_float(p,3,4)) { + return false; + } + bind._id = p._id; + bind._piece = SMP_row3; + bind._func = SMF_first; + bind._part[0] = SMO_light_source_i_attrib; + bind._arg[0] = InternalName::make("specular"); + bind._part[1] = SMO_identity; + bind._arg[1] = NULL; + bind._index = atoi(pieces[1].c_str() + 5); } else { cp_report_error(p,"Unknown attr parameter."); return false; @@ -1094,6 +1149,52 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { return true; } + if (pieces[0] == "texscale") { + if ((!cp_errchk_parameter_words(p,2))|| + (!cp_errchk_parameter_in(p)) || + (!cp_errchk_parameter_uniform(p))|| + (!cp_errchk_parameter_float(p,3,4))) { + return false; + } + ShaderMatSpec bind; + bind._id = p._id; + bind._piece = SMP_row3; + bind._func = SMF_first; + bind._part[0] = SMO_texscale_i; + bind._arg[0] = NULL; + bind._part[1] = SMO_identity; + bind._arg[1] = NULL; + bind._index = atoi(pieces[1].c_str()); + + cp_optimize_mat_spec(bind); + _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; + return true; + } + + if (pieces[0] == "texcolor") { + if ((!cp_errchk_parameter_words(p,2))|| + (!cp_errchk_parameter_in(p)) || + (!cp_errchk_parameter_uniform(p))|| + (!cp_errchk_parameter_float(p,3,4))) { + return false; + } + ShaderMatSpec bind; + bind._id = p._id; + bind._piece = SMP_row3; + bind._func = SMF_first; + bind._part[0] = SMO_texcolor_i; + bind._arg[0] = NULL; + bind._part[1] = SMO_identity; + bind._arg[1] = NULL; + bind._index = atoi(pieces[1].c_str()); + + cp_optimize_mat_spec(bind); + _mat_spec.push_back(bind); + _mat_deps |= bind._dep[0] | bind._dep[1]; + return true; + } + if (pieces[0] == "plane") { if ((!cp_errchk_parameter_words(p,2))|| (!cp_errchk_parameter_in(p)) || @@ -1233,9 +1334,9 @@ compile_parameter(ShaderArgInfo &p, int *arg_dim) { } ShaderTexSpec bind; bind._id = p._id; - bind._name = InternalName::make(pieces[1])->append("shadowMap"); - bind._stage = -1; - bind._part = STO_named_input; + bind._name = nullptr; + bind._stage = atoi(pieces[1].c_str()); + bind._part = STO_light_i_shadow_map; switch (p._type) { case SAT_sampler2d: bind._desired_type = Texture::TT_2d_texture; break; case SAT_sampler_cube: bind._desired_type = Texture::TT_cube_map; break; diff --git a/panda/src/gobj/shader.h b/panda/src/gobj/shader.h index 2eb0bc910a..6226b02960 100644 --- a/panda/src/gobj/shader.h +++ b/panda/src/gobj/shader.h @@ -202,6 +202,17 @@ public: // Hack for text rendering. Don't use in user shaders. SMO_tex_is_alpha_i, + SMO_transform_i, + SMO_slider_i, + + SMO_light_source_i_packed, + + // Texture scale component of texture matrix. + SMO_texscale_i, + + // Color of an M_blend texture stage. + SMO_texcolor_i, + SMO_INVALID }; diff --git a/panda/src/pgraph/alphaTestAttrib.cxx b/panda/src/pgraph/alphaTestAttrib.cxx index 8d31c57b12..a302026623 100644 --- a/panda/src/pgraph/alphaTestAttrib.cxx +++ b/panda/src/pgraph/alphaTestAttrib.cxx @@ -94,22 +94,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) AlphaTestAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // This is only important if the shader subsumes the alpha test, which only - // happens if there is an AuxBitplaneAttrib with ABO_glow. - const AuxBitplaneAttrib *aux; - if (!state->get_attrib(aux) || - (aux->get_outputs() & AuxBitplaneAttrib::ABO_glow) == 0) { - return nullptr; - } else { - return this; - } -} - /** * Tells the BamReader how to create objects of type AlphaTestAttrib. */ diff --git a/panda/src/pgraph/alphaTestAttrib.h b/panda/src/pgraph/alphaTestAttrib.h index 5c38727347..9b547ad2a7 100644 --- a/panda/src/pgraph/alphaTestAttrib.h +++ b/panda/src/pgraph/alphaTestAttrib.h @@ -46,7 +46,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: PandaCompareFunc _mode; diff --git a/panda/src/pgraph/auxBitplaneAttrib.cxx b/panda/src/pgraph/auxBitplaneAttrib.cxx index 1d8a5b3095..8f8e2d8a9f 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.cxx +++ b/panda/src/pgraph/auxBitplaneAttrib.cxx @@ -97,14 +97,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) AuxBitplaneAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * Tells the BamReader how to create objects of type AuxBitplaneAttrib. */ diff --git a/panda/src/pgraph/auxBitplaneAttrib.h b/panda/src/pgraph/auxBitplaneAttrib.h index 4c5866c49c..56658f0aa2 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.h +++ b/panda/src/pgraph/auxBitplaneAttrib.h @@ -72,7 +72,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: int _outputs; diff --git a/panda/src/pgraph/clipPlaneAttrib.cxx b/panda/src/pgraph/clipPlaneAttrib.cxx index c95f9437c4..102ddf6ad3 100644 --- a/panda/src/pgraph/clipPlaneAttrib.cxx +++ b/panda/src/pgraph/clipPlaneAttrib.cxx @@ -833,14 +833,6 @@ invert_compose_impl(const RenderAttrib *other) const { return other; } -/** - * - */ -CPT(RenderAttrib) ClipPlaneAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * This is patterned after TextureAttrib::sort_on_stages(), but since * planeNodes don't actually require sorting, this only empties the _filtered diff --git a/panda/src/pgraph/clipPlaneAttrib.h b/panda/src/pgraph/clipPlaneAttrib.h index c695e0391d..e62c57857a 100644 --- a/panda/src/pgraph/clipPlaneAttrib.h +++ b/panda/src/pgraph/clipPlaneAttrib.h @@ -98,7 +98,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: INLINE void check_filtered() const; diff --git a/panda/src/pgraph/colorAttrib.cxx b/panda/src/pgraph/colorAttrib.cxx index 7e007851fb..42e7c5578d 100644 --- a/panda/src/pgraph/colorAttrib.cxx +++ b/panda/src/pgraph/colorAttrib.cxx @@ -132,19 +132,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) ColorAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // For a ColorAttrib, the only relevant information is the type: is it flat- - // shaded or vertex-shaded? The actual color value is read by the shader - // from the graphics state. - - ColorAttrib *attrib = new ColorAttrib(_type, LColor(1.0f, 1.0f, 1.0f, 1.0f)); - return return_new(attrib); -} - /** * Quantizes the color color to the nearest multiple of 1000, just to prevent * runaway accumulation of only slightly-different ColorAttribs. diff --git a/panda/src/pgraph/colorAttrib.h b/panda/src/pgraph/colorAttrib.h index 54b57b8abb..9df0878559 100644 --- a/panda/src/pgraph/colorAttrib.h +++ b/panda/src/pgraph/colorAttrib.h @@ -52,7 +52,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: void quantize_color(); diff --git a/panda/src/pgraph/colorBlendAttrib.cxx b/panda/src/pgraph/colorBlendAttrib.cxx index 92fe98ab79..9341f2d808 100644 --- a/panda/src/pgraph/colorBlendAttrib.cxx +++ b/panda/src/pgraph/colorBlendAttrib.cxx @@ -148,14 +148,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) ColorBlendAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * Tells the BamReader how to create objects of type ColorBlendAttrib. */ diff --git a/panda/src/pgraph/colorBlendAttrib.h b/panda/src/pgraph/colorBlendAttrib.h index 6d66747218..0530d077ce 100644 --- a/panda/src/pgraph/colorBlendAttrib.h +++ b/panda/src/pgraph/colorBlendAttrib.h @@ -121,7 +121,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: Mode _mode; diff --git a/panda/src/pgraph/colorScaleAttrib.cxx b/panda/src/pgraph/colorScaleAttrib.cxx index 0975757604..79394a51f1 100644 --- a/panda/src/pgraph/colorScaleAttrib.cxx +++ b/panda/src/pgraph/colorScaleAttrib.cxx @@ -229,17 +229,6 @@ invert_compose_impl(const RenderAttrib *other) const { return return_new(attrib); } -/** - * - */ -CPT(RenderAttrib) ColorScaleAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // A ColorScaleAttrib doesn't directly contribute to the auto-shader - // contents--instead, the shader is always written to query attr_colorscale - // at runtime. So the attrib itself means nothing to the shader. - return NULL; -} - /** * Quantizes the color scale to the nearest multiple of 1000, just to prevent * runaway accumulation of only slightly-different ColorScaleAttribs. diff --git a/panda/src/pgraph/colorScaleAttrib.h b/panda/src/pgraph/colorScaleAttrib.h index aa3ace8738..b5e986e239 100644 --- a/panda/src/pgraph/colorScaleAttrib.h +++ b/panda/src/pgraph/colorScaleAttrib.h @@ -55,7 +55,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: void quantize_scale(); diff --git a/panda/src/pgraph/cullableObject.cxx b/panda/src/pgraph/cullableObject.cxx index 3d18dc6748..0630513696 100644 --- a/panda/src/pgraph/cullableObject.cxx +++ b/panda/src/pgraph/cullableObject.cxx @@ -34,6 +34,7 @@ CullableObject::FormatMap CullableObject::_format_map; LightMutex CullableObject::_format_lock; +PStatCollector CullableObject::_munge_pcollector("*:Munge"); PStatCollector CullableObject::_munge_geom_pcollector("*:Munge:Geom"); PStatCollector CullableObject::_munge_sprites_pcollector("*:Munge:Sprites"); PStatCollector CullableObject::_munge_sprites_verts_pcollector("*:Munge:Sprites:Verts"); @@ -55,7 +56,7 @@ munge_geom(GraphicsStateGuardianBase *gsg, GeomMunger *munger, nassertr(munger != nullptr, false); Thread *current_thread = traverser->get_current_thread(); - PStatTimer timer(_munge_geom_pcollector, current_thread); + PStatTimer timer(_munge_pcollector, current_thread); if (_geom != nullptr) { GraphicsStateGuardianBase *gsg = traverser->get_gsg(); int gsg_bits = gsg->get_supported_geom_rendering(); @@ -123,8 +124,11 @@ munge_geom(GraphicsStateGuardianBase *gsg, GeomMunger *munger, // Now invoke the munger to ensure the resulting geometry is in a GSG- // friendly form. - if (!munger->munge_geom(_geom, _munged_data, force, current_thread)) { - return false; + { + PStatTimer timer(_munge_geom_pcollector, current_thread); + if (!munger->munge_geom(_geom, _munged_data, force, current_thread)) { + return false; + } } // If we have prepared it for skinning via the shader generator, mark a diff --git a/panda/src/pgraph/cullableObject.h b/panda/src/pgraph/cullableObject.h index a8595da9f5..b02d7c79be 100644 --- a/panda/src/pgraph/cullableObject.h +++ b/panda/src/pgraph/cullableObject.h @@ -108,6 +108,7 @@ private: static FormatMap _format_map; static LightMutex _format_lock; + static PStatCollector _munge_pcollector; static PStatCollector _munge_geom_pcollector; static PStatCollector _munge_sprites_pcollector; static PStatCollector _munge_sprites_verts_pcollector; diff --git a/panda/src/pgraph/fogAttrib.cxx b/panda/src/pgraph/fogAttrib.cxx index 0606298fa4..87e12086d4 100644 --- a/panda/src/pgraph/fogAttrib.cxx +++ b/panda/src/pgraph/fogAttrib.cxx @@ -100,14 +100,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) FogAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * Tells the BamReader how to create objects of type FogAttrib. */ diff --git a/panda/src/pgraph/fogAttrib.h b/panda/src/pgraph/fogAttrib.h index 28a84600e0..0076ccfc82 100644 --- a/panda/src/pgraph/fogAttrib.h +++ b/panda/src/pgraph/fogAttrib.h @@ -43,7 +43,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: PT(Fog) _fog; diff --git a/panda/src/pgraph/lightAttrib.cxx b/panda/src/pgraph/lightAttrib.cxx index 2fb58c106d..21b5150dcc 100644 --- a/panda/src/pgraph/lightAttrib.cxx +++ b/panda/src/pgraph/lightAttrib.cxx @@ -850,14 +850,6 @@ invert_compose_impl(const RenderAttrib *other) const { return other; } -/** - * - */ -CPT(RenderAttrib) LightAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * Makes sure the lights are sorted in order of priority. Also counts the * number of non-ambient lights. diff --git a/panda/src/pgraph/lightAttrib.h b/panda/src/pgraph/lightAttrib.h index eaa86ff895..25fc1fa68a 100644 --- a/panda/src/pgraph/lightAttrib.h +++ b/panda/src/pgraph/lightAttrib.h @@ -103,7 +103,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: INLINE void check_sorted() const; diff --git a/panda/src/pgraph/lightRampAttrib.cxx b/panda/src/pgraph/lightRampAttrib.cxx index 38ed81affe..7a7637a35f 100644 --- a/panda/src/pgraph/lightRampAttrib.cxx +++ b/panda/src/pgraph/lightRampAttrib.cxx @@ -254,14 +254,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) LightRampAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * Tells the BamReader how to create objects of type LightRampAttrib. */ diff --git a/panda/src/pgraph/lightRampAttrib.h b/panda/src/pgraph/lightRampAttrib.h index b1ac147376..ccba3501cd 100644 --- a/panda/src/pgraph/lightRampAttrib.h +++ b/panda/src/pgraph/lightRampAttrib.h @@ -61,7 +61,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: LightRampMode _mode; diff --git a/panda/src/pgraph/logicOpAttrib.cxx b/panda/src/pgraph/logicOpAttrib.cxx index b632bb1b45..28381dfc5b 100644 --- a/panda/src/pgraph/logicOpAttrib.cxx +++ b/panda/src/pgraph/logicOpAttrib.cxx @@ -88,14 +88,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) LogicOpAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return RenderAttribRegistry::quick_get_global_ptr()->get_slot_default(_attrib_slot); -} - /** * Tells the BamReader how to create objects of type LogicOpAttrib. */ diff --git a/panda/src/pgraph/logicOpAttrib.h b/panda/src/pgraph/logicOpAttrib.h index 988836f8d1..81621b51dc 100644 --- a/panda/src/pgraph/logicOpAttrib.h +++ b/panda/src/pgraph/logicOpAttrib.h @@ -64,7 +64,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: Operation _op; diff --git a/panda/src/pgraph/materialAttrib.I b/panda/src/pgraph/materialAttrib.I index 3cb7f9e6be..d0cfc1ad14 100644 --- a/panda/src/pgraph/materialAttrib.I +++ b/panda/src/pgraph/materialAttrib.I @@ -15,7 +15,7 @@ * Use MaterialAttrib::make() to construct a new MaterialAttrib object. */ INLINE MaterialAttrib:: -MaterialAttrib() : _flags(0) { +MaterialAttrib() { } /** @@ -24,7 +24,7 @@ MaterialAttrib() : _flags(0) { */ INLINE bool MaterialAttrib:: is_off() const { - return _flags == 0; + return _material == nullptr; } /** @@ -35,11 +35,3 @@ INLINE Material *MaterialAttrib:: get_material() const { return _material; } - -/** - * Equivalent to get_material()->get_flags(). - */ -INLINE int MaterialAttrib:: -get_material_flags() const { - return _flags; -} diff --git a/panda/src/pgraph/materialAttrib.cxx b/panda/src/pgraph/materialAttrib.cxx index d8eee605d7..baeac4dc38 100644 --- a/panda/src/pgraph/materialAttrib.cxx +++ b/panda/src/pgraph/materialAttrib.cxx @@ -30,8 +30,6 @@ make(Material *material) { MaterialAttrib *attrib = new MaterialAttrib; attrib->_material = material; material->set_attrib_lock(); - attrib->_flags = material->_flags; - nassertr(attrib->_flags & Material::F_attrib_lock, nullptr); return return_new(attrib); } @@ -64,30 +62,6 @@ output(ostream &out) const { out << *_material; } else if (is_off()) { out << "(off)"; - } else { - // This is a state returned from get_auto_shader_attrib(). - out << "(on"; -#ifndef NDEBUG - if (_flags & Material::F_ambient) { - out << " amb"; - } - if (_flags & Material::F_diffuse) { - out << " diff"; - } - if (_flags & Material::F_specular) { - out << " spec"; - } - if (_flags & Material::F_emission) { - out << " emit"; - } - if (_flags & Material::F_local) { - out << " local"; - } - if (_flags & Material::F_twoside) { - out << " twoside"; - } -#endif - out << ")"; } } @@ -113,7 +87,7 @@ compare_to_impl(const RenderAttrib *other) const { if (_material != ta->_material) { return _material < ta->_material ? -1 : 1; } - return _flags < ta->_flags; + return 0; } /** @@ -124,26 +98,7 @@ compare_to_impl(const RenderAttrib *other) const { */ size_t MaterialAttrib:: get_hash_impl() const { - size_t hash = 0; - hash = pointer_hash::add_hash(hash, _material); - hash = int_hash::add_hash(hash, _flags); - return hash; -} - -/** - * - */ -CPT(RenderAttrib) MaterialAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - if (_material == nullptr) { - return this; - } else { - // Make a copy, but only with the flags, not with the material itself. - MaterialAttrib *attrib = new MaterialAttrib(); - attrib->_material = nullptr; - attrib->_flags = _flags; - return return_new(attrib); - } + return pointer_hash::add_hash(0, _material); } /** @@ -174,13 +129,7 @@ complete_pointers(TypedWritable **p_list, BamReader *manager) { int pi = RenderAttrib::complete_pointers(p_list, manager); TypedWritable *material = p_list[pi++]; - if (material != nullptr) { - _material = DCAST(Material, material); - _flags = _material->_flags | Material::F_attrib_lock; - } else { - _material = nullptr; - _flags = 0; - } + _material = DCAST(Material, material); return pi; } diff --git a/panda/src/pgraph/materialAttrib.h b/panda/src/pgraph/materialAttrib.h index 28bd90f8bd..8da67c3ada 100644 --- a/panda/src/pgraph/materialAttrib.h +++ b/panda/src/pgraph/materialAttrib.h @@ -36,9 +36,6 @@ PUBLISHED: INLINE bool is_off() const; INLINE Material *get_material() const; -public: - INLINE int get_material_flags() const; - PUBLISHED: MAKE_PROPERTY(material, get_material); @@ -48,11 +45,9 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: PT(Material) _material; - int _flags; PUBLISHED: static int get_class_slot() { diff --git a/panda/src/pgraph/renderAttrib.I b/panda/src/pgraph/renderAttrib.I index 9e431d7d6a..5df0d0774e 100644 --- a/panda/src/pgraph/renderAttrib.I +++ b/panda/src/pgraph/renderAttrib.I @@ -82,25 +82,6 @@ get_unique() const { return return_unique((RenderAttrib *)this); } -/** - * Returns the variant of this RenderAttrib that's most relevant for - * associating with an auto-generated shader. This should be a new - * RenderAttrib of the same type as this one, with any superfluous data set to - * neutral. Only the parts of the attrib that contribute to the shader should - * be reflected in the returned attrib. The idea is to associate the auto- - * generated shader with the most neutral form of all states, to allow it to - * be shared across as many RenderState objects as possible. - * - * If this RenderAttrib is completely irrelevant to the auto-shader, this - * should return NULL to indicate that the attrib won't be assocaited with the - * shader at all. In this case the attrib does not contribute to the shader - * meaningfully. - */ -INLINE CPT(RenderAttrib) RenderAttrib:: -get_auto_shader_attrib(const RenderState *state) const { - return get_auto_shader_attrib_impl(state); -} - /** * Calculates a suitable hash value for phash_map. */ diff --git a/panda/src/pgraph/renderAttrib.cxx b/panda/src/pgraph/renderAttrib.cxx index 10db3de16d..37b65f3b2a 100644 --- a/panda/src/pgraph/renderAttrib.cxx +++ b/panda/src/pgraph/renderAttrib.cxx @@ -112,14 +112,6 @@ cull_callback(CullTraverser *, const CullTraverserData &) const { return true; } -/** - * - */ -CPT(RenderAttrib) RenderAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return NULL; -} - /** * This method overrides ReferenceCount::unref() to clear the pointer from the * global object pool when its reference count goes to zero. diff --git a/panda/src/pgraph/renderAttrib.h b/panda/src/pgraph/renderAttrib.h index 9d6ed83a1a..1ffda64a16 100644 --- a/panda/src/pgraph/renderAttrib.h +++ b/panda/src/pgraph/renderAttrib.h @@ -71,7 +71,6 @@ PUBLISHED: INLINE int compare_to(const RenderAttrib &other) const; INLINE size_t get_hash() const; INLINE CPT(RenderAttrib) get_unique() const; - INLINE CPT(RenderAttrib) get_auto_shader_attrib(const RenderState *state) const; virtual bool unref() const FINAL; @@ -170,7 +169,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; void output_comparefunc(ostream &out, PandaCompareFunc fn) const; public: diff --git a/panda/src/pgraph/renderState.cxx b/panda/src/pgraph/renderState.cxx index 43a81bf83e..ee53a7d4a4 100644 --- a/panda/src/pgraph/renderState.cxx +++ b/panda/src/pgraph/renderState.cxx @@ -64,7 +64,6 @@ TypeHandle RenderState::_type_handle; RenderState:: RenderState() : _flags(0), - _auto_shader_state(NULL), _lock("RenderState") { if (_states == (States *)NULL) { @@ -88,7 +87,6 @@ RenderState:: RenderState(const RenderState ©) : _filled_slots(copy._filled_slots), _flags(0), - _auto_shader_state(NULL), _lock("RenderState") { // Copy over the attributes. @@ -131,14 +129,6 @@ RenderState:: nassertv(_saved_entry == -1); nassertv(_composition_cache.is_empty() && _invert_composition_cache.is_empty()); - // Make sure the _auto_shader_state cache pointer is cleared. - if (_auto_shader_state != (const RenderState *)NULL) { - if (_auto_shader_state != this) { - cache_unref_delete(_auto_shader_state); - } - _auto_shader_state = NULL; - } - // If this was true at the beginning of the destructor, but is no longer // true now, probably we've been double-deleted. nassertv(get_ref_count() == 0); @@ -665,24 +655,6 @@ unref() const { return false; } -/** - * Returns the base RenderState that should have the generated_shader stored - * within it, for generated shader states. The returned object might be the - * same as this object, or it might be a different RenderState with certain - * attributes removed, or set to their default values. - * - * The point is to avoid needless regeneration of the shader attrib by storing - * the generated shader on a common RenderState object, with all irrelevant - * attributes removed. - */ -const RenderState *RenderState:: -get_auto_shader_state() const { - if (_auto_shader_state == (const RenderState *)NULL) { - ((RenderState *)this)->assign_auto_shader_state(); - } - return _auto_shader_state; -} - /** * */ @@ -1259,54 +1231,6 @@ do_calc_hash() { _flags |= F_hash_known; } -/** - * Sets _auto_shader_state to the appropriate RenderState object pointer, - * either the same pointer as this object, or some other (simpler) - * RenderState. - */ -void RenderState:: -assign_auto_shader_state() { - CPT(RenderState) state = do_calc_auto_shader_state(); - - { - LightReMutexHolder holder(*_states_lock); - if (_auto_shader_state == (const RenderState *)NULL) { - _auto_shader_state = state; - if (_auto_shader_state != this) { - _auto_shader_state->cache_ref(); - } - } - } -} - -/** - * Returns the appropriate RenderState that should be used to store the auto - * shader pointer for nodes that shader this RenderState. - */ -CPT(RenderState) RenderState:: -do_calc_auto_shader_state() { - RenderState *state = new RenderState; - - SlotMask mask = _filled_slots; - int slot = mask.get_lowest_on_bit(); - while (slot >= 0) { - const Attribute &attrib = _attributes[slot]; - nassertr(attrib._attrib != (RenderAttrib *)NULL, this); - CPT(RenderAttrib) new_attrib = attrib._attrib->get_auto_shader_attrib(this); - if (new_attrib != NULL) { - nassertr(new_attrib->get_slot() == slot, this); - state->_attributes[slot].set(new_attrib, 0); - state->_filled_slots.set_bit(slot); - } - - mask.clear_bit(slot); - slot = mask.get_lowest_on_bit(); - } - - return return_new(state); -} - - /** * This function is used to share a common RenderState pointer for all * equivalent RenderState objects. @@ -1705,14 +1629,6 @@ void RenderState:: remove_cache_pointers() { nassertv(_states_lock->debug_is_locked()); - // First, make sure the _auto_shader_state cache pointer is cleared. - if (_auto_shader_state != (const RenderState *)NULL) { - if (_auto_shader_state != this) { - cache_unref_delete(_auto_shader_state); - } - _auto_shader_state = NULL; - } - // Fortunately, since we added CompositionCache records in pairs, we know // exactly the set of RenderState objects that have us in their cache: it's // the same set of RenderState objects that we have in our own cache. diff --git a/panda/src/pgraph/renderState.h b/panda/src/pgraph/renderState.h index a1b1813ea9..0cdcca07a1 100644 --- a/panda/src/pgraph/renderState.h +++ b/panda/src/pgraph/renderState.h @@ -130,8 +130,6 @@ PUBLISHED: EXTENSION(PyObject *get_composition_cache() const); EXTENSION(PyObject *get_invert_composition_cache() const); - const RenderState *get_auto_shader_state() const; - void output(ostream &out) const; void write(ostream &out, int indent_level) const; @@ -173,8 +171,6 @@ private: INLINE bool do_node_unref() const; INLINE void calc_hash(); void do_calc_hash(); - void assign_auto_shader_state(); - CPT(RenderState) do_calc_auto_shader_state(); class CompositionCycleDescEntry { public: @@ -317,8 +313,6 @@ private: int _draw_order; size_t _hash; - const RenderState *_auto_shader_state; - enum Flags { F_checked_bin_index = 0x000001, F_checked_cull_callback = 0x000002, diff --git a/panda/src/pgraph/rescaleNormalAttrib.cxx b/panda/src/pgraph/rescaleNormalAttrib.cxx index e9d081e43c..fbc4d59274 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.cxx +++ b/panda/src/pgraph/rescaleNormalAttrib.cxx @@ -80,22 +80,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) RescaleNormalAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // We currently only support M_normalize in the ShaderGenerator. - /*if (_mode == M_none || _mode == M_normalize) { - return this; - } else { - return RescaleNormalAttrib::make(M_normalize); - }*/ - // Actually, we currently ignore this attribute in the shader generator, - // and always normalize the normals. It's too much of a bother. - return nullptr; -} - /** * Tells the BamReader how to create objects of type RescaleNormalAttrib. */ diff --git a/panda/src/pgraph/rescaleNormalAttrib.h b/panda/src/pgraph/rescaleNormalAttrib.h index d76d51e6de..746db42717 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.h +++ b/panda/src/pgraph/rescaleNormalAttrib.h @@ -57,7 +57,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: Mode _mode; diff --git a/panda/src/pgraph/shaderAttrib.cxx b/panda/src/pgraph/shaderAttrib.cxx index 04d6196aa2..67bba2d196 100644 --- a/panda/src/pgraph/shaderAttrib.cxx +++ b/panda/src/pgraph/shaderAttrib.cxx @@ -695,26 +695,6 @@ compose_impl(const RenderAttrib *other) const { return return_new(attr); } -/** - * - */ -CPT(RenderAttrib) ShaderAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // For a ShaderAttrib, we only need to preserve the auto-shader flags. - // Custom shaders, and custom shader inputs, aren't relevant to the shader - // generator. - ShaderAttrib *attrib = new ShaderAttrib; - attrib->_auto_shader = _auto_shader; - attrib->_has_shader = _has_shader; - attrib->_auto_normal_on = _auto_normal_on; - attrib->_auto_glow_on = _auto_glow_on; - attrib->_auto_gloss_on = _auto_gloss_on; - attrib->_auto_ramp_on = _auto_ramp_on; - attrib->_auto_shadow_on = _auto_shadow_on; - attrib->_flags = _flags; - return return_new(attrib); -} - /** * Factory method to generate a Shader object */ diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index 719106c0b6..c719ce1791 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -127,7 +127,6 @@ protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: diff --git a/panda/src/pgraph/texGenAttrib.cxx b/panda/src/pgraph/texGenAttrib.cxx index c7ace978c0..451eacab83 100644 --- a/panda/src/pgraph/texGenAttrib.cxx +++ b/panda/src/pgraph/texGenAttrib.cxx @@ -432,14 +432,6 @@ invert_compose_impl(const RenderAttrib *other) const { return return_new(attrib); } -/** - * - */ -CPT(RenderAttrib) TexGenAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - return this; -} - /** * This method is to be called after the _stages map has been built up * internally through some artificial means; it copies the appropriate diff --git a/panda/src/pgraph/texGenAttrib.h b/panda/src/pgraph/texGenAttrib.h index c2b0e87132..3cf0323edc 100644 --- a/panda/src/pgraph/texGenAttrib.h +++ b/panda/src/pgraph/texGenAttrib.h @@ -68,7 +68,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: class ModeDef; diff --git a/panda/src/pgraph/texMatrixAttrib.cxx b/panda/src/pgraph/texMatrixAttrib.cxx index 84538033fd..4e2e1adba8 100644 --- a/panda/src/pgraph/texMatrixAttrib.cxx +++ b/panda/src/pgraph/texMatrixAttrib.cxx @@ -415,28 +415,6 @@ invert_compose_impl(const RenderAttrib *other) const { return return_new(attrib); } -/** - * - */ -CPT(RenderAttrib) TexMatrixAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - // For a TexMatrixAttrib, the particular matrix per TextureStage isn't - // important, just whether there is a matrix at all. So we create a new - // state with an identity matrix everywhere there is a matrix at all in the - // original. - - TexMatrixAttrib *attrib = new TexMatrixAttrib; - - Stages::const_iterator ai; - for (ai = _stages.begin(); ai != _stages.end(); ++ai) { - StageNode sn((*ai)._stage); - sn._transform = TransformState::make_identity(); - attrib->_stages.insert(attrib->_stages.end(), sn); - } - - return return_new(attrib); -} - /** * Tells the BamReader how to create objects of type TexMatrixAttrib. */ diff --git a/panda/src/pgraph/texMatrixAttrib.h b/panda/src/pgraph/texMatrixAttrib.h index b0b7790851..36e06b1549 100644 --- a/panda/src/pgraph/texMatrixAttrib.h +++ b/panda/src/pgraph/texMatrixAttrib.h @@ -67,7 +67,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: INLINE void check_stage_list() const; diff --git a/panda/src/pgraph/textureAttrib.I b/panda/src/pgraph/textureAttrib.I index 6649c8d87a..da1feca0be 100644 --- a/panda/src/pgraph/textureAttrib.I +++ b/panda/src/pgraph/textureAttrib.I @@ -140,26 +140,6 @@ get_on_texture(TextureStage *stage) const { return NULL; } -/** - * Returns the type of the texture associated with the indicated stage. It is - * an error to call this if has_on_stage(stage) returns false. - * - * This method is no different than get_on_texture(stage)->get_texture_type(); - * it merely exists to address a corner case for the shader generator. - */ -INLINE Texture::TextureType TextureAttrib:: -get_on_texture_type(TextureStage *stage) const { - Stages::const_iterator si; - si = _on_stages.find(StageNode(stage)); - nassertr(si != _on_stages.end(), Texture::TT_2d_texture); - - if ((*si)._texture == nullptr) { - return (*si)._texture_type; - } else { - return (*si)._texture->get_texture_type(); - } -} - /** * Returns the sampler associated with the indicated stage, or the one * associated with its texture if no custom stage has been specified. It is @@ -235,26 +215,6 @@ is_identity() const { return _on_stages.empty() && _off_stages.empty() && !_off_all_stages; } -/** - * Call only on a state returned by get_auto_shader_attrib. - */ -bool TextureAttrib:: -on_stage_affects_rgb(size_t n) const { - nassertr(n < _render_stages.size(), false); - StageNode *stage = _render_stages[n]; - return stage->_texture_affects_rgb; -} - -/** - * Call only on a state returned by get_auto_shader_attrib. - */ -bool TextureAttrib:: -on_stage_affects_alpha(size_t n) const { - nassertr(n < _render_stages.size(), false); - StageNode *stage = _render_stages[n]; - return stage->_texture_affects_alpha; -} - /** * Confirms whether the _on_stages list is still sorted. It will become * unsorted if someone calls TextureStage::set_sort(). @@ -263,7 +223,7 @@ on_stage_affects_alpha(size_t n) const { */ INLINE void TextureAttrib:: check_sorted() const { - if (_sort_seq != TextureStage::get_sort_seq() && !_sort_seq.is_fresh()) { + if (_sort_seq != TextureStage::get_sort_seq()) { ((TextureAttrib *)this)->sort_on_stages(); } } diff --git a/panda/src/pgraph/textureAttrib.cxx b/panda/src/pgraph/textureAttrib.cxx index 8c1b4833ff..9b30906e1f 100644 --- a/panda/src/pgraph/textureAttrib.cxx +++ b/panda/src/pgraph/textureAttrib.cxx @@ -385,19 +385,9 @@ output(ostream &out) const { const StageNode &sn = *(*ri); TextureStage *stage = sn._stage; Texture *tex = sn._texture; + out << " " << stage->get_name(); if (tex != nullptr) { - out << " " << stage->get_name() << ":" << tex->get_name(); - } else { - out << " " << stage->get_name() << ":(" << sn._texture_type; - if (sn._texture_affects_rgb) { - out << " rgb"; - if (sn._texture_affects_alpha) { - out << "a"; - } - } else if (sn._texture_affects_alpha) { - out << " alpha"; - } - out << ")"; + out << ":" << tex->get_name(); } if (sn._override != 0) { out << "^" << sn._override; @@ -513,19 +503,6 @@ compare_to_impl(const RenderAttrib *other) const { } } - if (texture == nullptr) { - // This is an attribute returned by get_auto_shader_attrib_impl. - if ((*si)._texture_type != (*osi)._texture_type) { - return (*si)._texture_type < (*osi)._texture_type ? -1 : 1; - } - if ((*si)._texture_affects_rgb != (*osi)._texture_affects_rgb) { - return (*si)._texture_affects_rgb < (*osi)._texture_affects_rgb ? -1 : 1; - } - if ((*si)._texture_affects_alpha != (*osi)._texture_affects_alpha) { - return (*si)._texture_affects_alpha < (*osi)._texture_affects_alpha ? -1 : 1; - } - } - ++si; ++osi; } @@ -589,13 +566,6 @@ get_hash_impl() const { hash = pointer_hash::add_hash(hash, sn._texture); hash = int_hash::add_hash(hash, (int)sn._implicit_sort); hash = int_hash::add_hash(hash, sn._override); - - if (sn._texture == nullptr) { - // This is an attribute returned by get_auto_shader_attrib_impl. - hash = int_hash::add_hash(hash, (int)sn._texture_type); - hash = int_hash::add_hash(hash, (int)sn._texture_affects_rgb); - hash = int_hash::add_hash(hash, (int)sn._texture_affects_alpha); - } } // This bool value goes here, between the two lists, to differentiate @@ -767,52 +737,6 @@ invert_compose_impl(const RenderAttrib *other) const { return other; } -/** - * - */ -CPT(RenderAttrib) TextureAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - if (_on_stages.empty()) { - // Having no stages is the same as not applying a texture attribute. - return nullptr; - } - - // We make a texture attribute that does not store the texture and sampler, - // so that we don't have to generate a shader for every possible texture. - // We do have to store the few texture properties that do affect the - // generated shader. - PT(TextureAttrib) attrib = new TextureAttrib; - attrib->_on_stages = _on_stages; - attrib->sort_on_stages(); - - Stages::iterator si; - for (si = attrib->_on_stages.begin(); si != attrib->_on_stages.end(); ++si) { - Texture::Format format = (*si)._texture->get_format(); - (*si)._texture_type = (*si)._texture->get_texture_type(); - (*si)._texture_affects_rgb = (format != Texture::F_alpha); - (*si)._texture_affects_alpha = Texture::has_alpha(format); - (*si)._texture = nullptr; - (*si)._has_sampler = false; - - // We will no longer be composing or sorting this state so we can get rid - // of these values. - (*si)._override = 0; - (*si)._implicit_sort = 0; - - // Exception to optimize a common case: if the first texture is an RGB - // texture, we don't care about whether it affects the alpha channel. - if (attrib->_render_stages[0] == &(*si) && - (*si)._texture_affects_rgb && !(*si)._texture_affects_alpha) { - (*si)._texture_affects_alpha = true; - } - } - - // Prevent check_sorted() from being called on this state. - attrib->_sort_seq = UpdateSeq::fresh(); - - return return_new(attrib); -} - /** * Tells the BamReader how to create objects of type TextureAttrib. */ diff --git a/panda/src/pgraph/textureAttrib.h b/panda/src/pgraph/textureAttrib.h index 9f1c13e3c8..efb1ad786d 100644 --- a/panda/src/pgraph/textureAttrib.h +++ b/panda/src/pgraph/textureAttrib.h @@ -59,7 +59,6 @@ PUBLISHED: INLINE int get_ff_tc_index(int n) const; INLINE bool has_on_stage(TextureStage *stage) const; INLINE Texture *get_on_texture(TextureStage *stage) const; - INLINE Texture::TextureType get_on_texture_type(TextureStage *stage) const; INLINE const SamplerState &get_on_sampler(TextureStage *stage) const; INLINE int get_on_stage_override(TextureStage *stage) const; @@ -82,8 +81,6 @@ PUBLISHED: CPT(RenderAttrib) unify_texture_stages(TextureStage *stage) const; public: - INLINE bool on_stage_affects_rgb(size_t n) const; - INLINE bool on_stage_affects_alpha(size_t n) const; CPT(TextureAttrib) filter_to_max(int max_texture_stages) const; virtual bool lower_attrib_can_override() const; @@ -97,7 +94,6 @@ protected: virtual size_t get_hash_impl() const; virtual CPT(RenderAttrib) compose_impl(const RenderAttrib *other) const; virtual CPT(RenderAttrib) invert_compose_impl(const RenderAttrib *other) const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: INLINE void check_sorted() const; @@ -117,11 +113,6 @@ private: int _ff_tc_index; unsigned int _implicit_sort; int _override; - - // These fields are used by the shader generator. - Texture::TextureType _texture_type : 16; - bool _texture_affects_rgb : 8; - bool _texture_affects_alpha : 8; }; class CompareTextureStagePriorities { diff --git a/panda/src/pgraph/transparencyAttrib.cxx b/panda/src/pgraph/transparencyAttrib.cxx index d998004f09..ad105f3214 100644 --- a/panda/src/pgraph/transparencyAttrib.cxx +++ b/panda/src/pgraph/transparencyAttrib.cxx @@ -109,21 +109,6 @@ get_hash_impl() const { return hash; } -/** - * - */ -CPT(RenderAttrib) TransparencyAttrib:: -get_auto_shader_attrib_impl(const RenderState *state) const { - if (_mode == TransparencyAttrib::M_alpha) { - return this; - } else if (_mode == TransparencyAttrib::M_premultiplied_alpha || - _mode == TransparencyAttrib::M_dual) { - return return_new(new TransparencyAttrib(M_alpha)); - } else { - return nullptr; - } -} - /** * Tells the BamReader how to create objects of type TransparencyAttrib. */ diff --git a/panda/src/pgraph/transparencyAttrib.h b/panda/src/pgraph/transparencyAttrib.h index ebd7f4f157..ef890aa158 100644 --- a/panda/src/pgraph/transparencyAttrib.h +++ b/panda/src/pgraph/transparencyAttrib.h @@ -59,7 +59,6 @@ public: protected: virtual int compare_to_impl(const RenderAttrib *other) const; virtual size_t get_hash_impl() const; - virtual CPT(RenderAttrib) get_auto_shader_attrib_impl(const RenderState *state) const; private: Mode _mode; diff --git a/panda/src/pgraphnodes/directionalLight.cxx b/panda/src/pgraphnodes/directionalLight.cxx index f0d84ffb9a..9d198fac6f 100644 --- a/panda/src/pgraphnodes/directionalLight.cxx +++ b/panda/src/pgraphnodes/directionalLight.cxx @@ -56,9 +56,7 @@ fillin(DatagramIterator &scan, BamReader *) { */ DirectionalLight:: DirectionalLight(const string &name) : - LightLensNode(name, new OrthographicLens()), - _has_specular_color(false) -{ + LightLensNode(name, new OrthographicLens()) { _lenses[0]._lens->set_interocular_distance(0); } @@ -69,7 +67,6 @@ DirectionalLight(const string &name) : DirectionalLight:: DirectionalLight(const DirectionalLight ©) : LightLensNode(copy), - _has_specular_color(copy._has_specular_color), _cycler(copy._cycler) { } diff --git a/panda/src/pgraphnodes/directionalLight.h b/panda/src/pgraphnodes/directionalLight.h index 5f0404b9a8..ea09627bd7 100644 --- a/panda/src/pgraphnodes/directionalLight.h +++ b/panda/src/pgraphnodes/directionalLight.h @@ -59,8 +59,6 @@ public: int light_id); private: - bool _has_specular_color; - // This is the data that must be cycled between pipeline stages. class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { public: diff --git a/panda/src/pgraphnodes/lightLensNode.I b/panda/src/pgraphnodes/lightLensNode.I index 8fff5b2533..eb2b192f97 100644 --- a/panda/src/pgraphnodes/lightLensNode.I +++ b/panda/src/pgraphnodes/lightLensNode.I @@ -11,6 +11,15 @@ * @date 2002-03-26 */ +/** + * Returns true if this light defines a specular color, false if the specular + * color is derived automatically from the light color. + */ +INLINE bool LightLensNode:: +has_specular_color() const { + return _has_specular_color; +} + /** * Returns whether this light is configured to cast shadows or not. */ diff --git a/panda/src/pgraphnodes/lightLensNode.cxx b/panda/src/pgraphnodes/lightLensNode.cxx index a843123cff..f68b7084ec 100644 --- a/panda/src/pgraphnodes/lightLensNode.cxx +++ b/panda/src/pgraphnodes/lightLensNode.cxx @@ -28,6 +28,7 @@ TypeHandle LightLensNode::_type_handle; LightLensNode:: LightLensNode(const string &name, Lens *lens) : Camera(name, lens), + _has_specular_color(false), _attrib_count(0) { set_active(false); @@ -63,6 +64,7 @@ LightLensNode(const LightLensNode ©) : _shadow_caster(copy._shadow_caster), _sb_size(copy._sb_size), _sb_sort(-10), + _has_specular_color(copy._has_specular_color), _attrib_count(0) { } diff --git a/panda/src/pgraphnodes/lightLensNode.h b/panda/src/pgraphnodes/lightLensNode.h index 11c259e5e5..02dcd9bbff 100644 --- a/panda/src/pgraphnodes/lightLensNode.h +++ b/panda/src/pgraphnodes/lightLensNode.h @@ -35,6 +35,8 @@ PUBLISHED: LightLensNode(const string &name, Lens *lens = new PerspectiveLens()); virtual ~LightLensNode(); + INLINE bool has_specular_color() const; + INLINE bool is_shadow_caster() const; INLINE void set_shadow_caster(bool caster); INLINE void set_shadow_caster(bool caster, int buffer_xsize, int buffer_ysize, int sort = -10); @@ -54,6 +56,7 @@ protected: LVecBase2i _sb_size; bool _shadow_caster; + bool _has_specular_color; int _sb_sort; // This is really a map of GSG -> GraphicsOutput. diff --git a/panda/src/pgraphnodes/pointLight.cxx b/panda/src/pgraphnodes/pointLight.cxx index d3f7192248..caa8d86261 100644 --- a/panda/src/pgraphnodes/pointLight.cxx +++ b/panda/src/pgraphnodes/pointLight.cxx @@ -61,9 +61,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { */ PointLight:: PointLight(const string &name) : - LightLensNode(name), - _has_specular_color(false) -{ + LightLensNode(name) { PT(Lens) lens; lens = new PerspectiveLens(90, 90); lens->set_interocular_distance(0); @@ -98,7 +96,6 @@ PointLight(const string &name) : PointLight:: PointLight(const PointLight ©) : LightLensNode(copy), - _has_specular_color(copy._has_specular_color), _cycler(copy._cycler) { } diff --git a/panda/src/pgraphnodes/pointLight.h b/panda/src/pgraphnodes/pointLight.h index c0907dba01..1029e1d41d 100644 --- a/panda/src/pgraphnodes/pointLight.h +++ b/panda/src/pgraphnodes/pointLight.h @@ -63,8 +63,6 @@ public: int light_id); private: - bool _has_specular_color; - // This is the data that must be cycled between pipeline stages. class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { public: diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index e78ac65f3a..62206f1d69 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -40,24 +40,27 @@ #include "directionalLight.h" #include "rescaleNormalAttrib.h" #include "pointLight.h" +#include "sphereLight.h" #include "spotlight.h" #include "lightLensNode.h" #include "lvector4.h" #include "config_pgraphnodes.h" +#include "pStatTimer.h" TypeHandle ShaderGenerator::_type_handle; #ifdef HAVE_CG +static PStatCollector lookup_collector("*:Munge:ShaderGen:Lookup"); +static PStatCollector synthesize_collector("*:Munge:ShaderGen:Synthesize"); + /** * Create a ShaderGenerator. This has no state, except possibly to cache * certain results. The parameter that must be passed is the GSG to which the * shader generator belongs. */ ShaderGenerator:: -ShaderGenerator(GraphicsStateGuardianBase *gsg) : - _gsg(gsg) { - +ShaderGenerator(GraphicsStateGuardianBase *gsg) { // The ATTR# input semantics seem to map to generic vertex attributes in // both arbvp1 and glslv, which behave more consistently. However, they // don't exist in Direct3D 9. Use this silly little check for now. @@ -66,6 +69,10 @@ ShaderGenerator(GraphicsStateGuardianBase *gsg) : #else _use_generic_attr = false; #endif + + // Do we want to use the ARB_shadow extension? This also allows us to use + // hardware shadows PCF. + _use_shadow_filter = gsg->get_supports_shadow_filter(); } /** @@ -159,13 +166,8 @@ alloc_freg() { case 6: _ftregs_used += 1; return "TEXCOORD6"; case 7: _ftregs_used += 1; return "TEXCOORD7"; } -/* - * We really shouldn't rely on COLOR fregs, since the clamping can have - * unexpected side-effects. switch (_fcregs_used) { case 0: _fcregs_used += - * 1; return "COLOR0"; case 1: _fcregs_used += 1; return "COLOR1"; } These - * don't exist in arbvp1arbfp1, though they're reportedly supported by other - * profiles. - */ + // NB. We really shouldn't use the COLOR fregs, since the clamping can have + // unexpected side-effects. switch (_ftregs_used) { case 8: _ftregs_used += 1; return "TEXCOORD8"; case 9: _ftregs_used += 1; return "TEXCOORD9"; @@ -184,340 +186,334 @@ alloc_freg() { * analysis are stored in instance variables of the Shader Generator. */ void ShaderGenerator:: -analyze_renderstate(const RenderState *rs) { - clear_analysis(); +analyze_renderstate(ShaderKey &key, const RenderState *rs) { + const ShaderAttrib *shader_attrib; + rs->get_attrib_def(shader_attrib); + nassertv(shader_attrib->auto_shader()); // verify_enforce_attrib_lock(); - _state = rs; const AuxBitplaneAttrib *aux_bitplane; rs->get_attrib_def(aux_bitplane); - int outputs = aux_bitplane->get_outputs(); + key._outputs = aux_bitplane->get_outputs(); // Decide whether or not we need alpha testing or alpha blending. - + bool have_alpha_test = false; + bool have_alpha_blend = false; const AlphaTestAttrib *alpha_test; rs->get_attrib_def(alpha_test); - if ((alpha_test->get_mode() != RenderAttrib::M_none)&& - (alpha_test->get_mode() != RenderAttrib::M_always)) { - _have_alpha_test = true; + if (alpha_test->get_mode() != RenderAttrib::M_none && + alpha_test->get_mode() != RenderAttrib::M_always) { + have_alpha_test = true; } const ColorBlendAttrib *color_blend; rs->get_attrib_def(color_blend); if (color_blend->get_mode() != ColorBlendAttrib::M_none) { - _have_alpha_blend = true; + have_alpha_blend = true; } const TransparencyAttrib *transparency; rs->get_attrib_def(transparency); - if ((transparency->get_mode() == TransparencyAttrib::M_alpha)|| - (transparency->get_mode() == TransparencyAttrib::M_premultiplied_alpha)|| - (transparency->get_mode() == TransparencyAttrib::M_dual)) { - _have_alpha_blend = true; + if (transparency->get_mode() == TransparencyAttrib::M_alpha || + transparency->get_mode() == TransparencyAttrib::M_premultiplied_alpha || + transparency->get_mode() == TransparencyAttrib::M_dual) { + have_alpha_blend = true; } // Decide what to send to the framebuffer alpha, if anything. - - if (outputs & AuxBitplaneAttrib::ABO_glow) { - if (_have_alpha_blend) { - _calc_primary_alpha = true; - _out_primary_glow = false; - _disable_alpha_write = true; - } else if (_have_alpha_test) { - _calc_primary_alpha = true; - _out_primary_glow = true; - _subsume_alpha_test = true; - } else { - _calc_primary_alpha = false; - _out_primary_glow = true; - } - } else { - if (_have_alpha_blend || _have_alpha_test) { - _calc_primary_alpha = true; + if (key._outputs & AuxBitplaneAttrib::ABO_glow) { + if (have_alpha_blend) { + key._outputs &= ~AuxBitplaneAttrib::ABO_glow; + key._disable_alpha_write = true; + } else if (have_alpha_test) { + // Subsume the alpha test in our shader. + key._alpha_test_mode = alpha_test->get_mode(); + key._alpha_test_ref = alpha_test->get_reference_alpha(); } } - // Determine what to put into the aux bitplane. - - _out_aux_normal = (outputs & AuxBitplaneAttrib::ABO_aux_normal) ? true:false; - _out_aux_glow = (outputs & AuxBitplaneAttrib::ABO_aux_glow) ? true:false; - _out_aux_any = (_out_aux_normal || _out_aux_glow); - - if (_out_aux_normal) { - _need_eye_normal = true; + if (have_alpha_blend || have_alpha_test) { + key._calc_primary_alpha = true; } - // Count number of textures. - - const TextureAttrib *texture; - rs->get_attrib_def(texture); - _num_textures = texture->get_num_on_stages(); - // Determine whether or not vertex colors or flat colors are present. - const ColorAttrib *color; rs->get_attrib_def(color); - if (color->get_color_type() == ColorAttrib::T_vertex) { - _vertex_colors = true; - } else if (color->get_color_type() == ColorAttrib::T_flat) { - _flat_colors = true; - } - - // Find the material. + key._color_type = color->get_color_type(); + // Store the material flags (not the material values itself). const MaterialAttrib *material; rs->get_attrib_def(material); - _material_flags = material->get_material_flags(); + if (material->get_material() != nullptr) { + key._material_flags = material->get_material()->get_flags(); + } // Break out the lights by type. - - _shadows = false; const LightAttrib *la; rs->get_attrib_def(la); + bool have_ambient = false; for (int i = 0; i < la->get_num_on_lights(); ++i) { - NodePath light = la->get_on_light(i); - nassertv(!light.is_empty()); - PandaNode *light_obj = light.node(); - nassertv(light_obj != (PandaNode *)NULL); + NodePath np = la->get_on_light(i); + nassertv(!np.is_empty()); + PandaNode *node = np.node(); + nassertv(node != nullptr); - if (light_obj->is_ambient_light()) { - _have_ambient = true; - _lighting = true; + if (node->is_ambient_light()) { + have_ambient = true; + key._lighting = true; + } else { + ShaderKey::LightInfo info; + info._type = node->get_type(); + info._flags = 0; - } else if (light_obj->is_of_type(LightLensNode::get_class_type())) { - _lights_np.push_back(light); - _lights.push_back((LightLensNode *)light_obj); - if (((const LightLensNode *)light_obj)->is_shadow_caster()) { - _shadows = true; + if (node->is_of_type(LightLensNode::get_class_type())) { + const LightLensNode *llnode = (const LightLensNode *)node; + if (shader_attrib->auto_shadow_on() && llnode->is_shadow_caster()) { + info._flags |= ShaderKey::LF_has_shadows; + } + if (llnode->has_specular_color()) { + info._flags |= ShaderKey::LF_has_specular_color; + } } - _lighting = true; - _need_eye_normal = true; + + key._lights.push_back(info); + key._lighting = true; } } + bool normal_mapping = key._lighting && shader_attrib->auto_normal_on(); + // See if there is a normal map, height map, gloss map, or glow map. Also // check if anything has TexGen. + const TextureAttrib *texture; + rs->get_attrib_def(texture); const TexGenAttrib *tex_gen; rs->get_attrib_def(tex_gen); - for (int i = 0; i < _num_textures; ++i) { + const TexMatrixAttrib *tex_matrix; + rs->get_attrib_def(tex_matrix); + + size_t num_textures = texture->get_num_on_stages(); + for (size_t i = 0; i < num_textures; ++i) { TextureStage *stage = texture->get_on_stage(i); - TextureStage::Mode mode = stage->get_mode(); - if ((mode == TextureStage::M_normal)|| - (mode == TextureStage::M_normal_height)|| - (mode == TextureStage::M_normal_gloss)) { - _map_index_normal = i; + Texture *tex = texture->get_on_texture(stage); + nassertd(tex != nullptr) continue; + + ShaderKey::TextureInfo info; + info._type = tex->get_texture_type(); + info._mode = stage->get_mode(); + info._flags = 0; + + // While we look at the mode, determine whether we need to change the mode + // in order to reflect disabled features. + switch (info._mode) { + case TextureStage::M_modulate: + { + Texture::Format format = tex->get_format(); + if (format != Texture::F_alpha) { + info._flags |= ShaderKey::TF_has_rgb; + } + if (Texture::has_alpha(format)) { + info._flags |= ShaderKey::TF_has_alpha; + } + } + break; + + case TextureStage::M_modulate_glow: + if (shader_attrib->auto_glow_on()) { + info._flags = ShaderKey::TF_map_glow; + } else { + info._mode = TextureStage::M_modulate; + info._flags = ShaderKey::TF_has_rgb; + } + break; + + case TextureStage::M_modulate_gloss: + if (shader_attrib->auto_gloss_on()) { + info._flags = ShaderKey::TF_map_glow; + } else { + info._mode = TextureStage::M_modulate; + info._flags = ShaderKey::TF_has_rgb; + } + break; + + case TextureStage::M_normal_height: + if (parallax_mapping_samples == 0) { + info._mode = TextureStage::M_normal; + } else if (!shader_attrib->auto_normal_on() || + (!key._lighting && (key._outputs & AuxBitplaneAttrib::ABO_aux_normal) == 0)) { + info._mode = TextureStage::M_height; + info._flags = ShaderKey::TF_has_alpha; + } else { + info._flags = ShaderKey::TF_map_normal | ShaderKey::TF_map_height; + } + break; + + case TextureStage::M_normal_gloss: + if (!shader_attrib->auto_gloss_on() || !key._lighting) { + info._mode = TextureStage::M_normal; + } else if (!shader_attrib->auto_normal_on()) { + info._mode = TextureStage::M_gloss; + } else { + info._flags = ShaderKey::TF_map_normal | ShaderKey::TF_map_gloss; + } + break; } - if ((mode == TextureStage::M_height)||(mode == TextureStage::M_normal_height)) { - _map_index_height = i; + + // In fact, perhaps this stage should be disabled altogether? + switch (info._mode) { + case TextureStage::M_normal: + if (!shader_attrib->auto_normal_on() || + (!key._lighting && (key._outputs & AuxBitplaneAttrib::ABO_aux_normal) == 0)) { + continue; + } else { + info._flags = ShaderKey::TF_map_normal; + } + break; + case TextureStage::M_glow: + if (shader_attrib->auto_glow_on()) { + info._flags = ShaderKey::TF_map_glow; + } else { + continue; + } + break; + case TextureStage::M_gloss: + if (key._lighting && shader_attrib->auto_gloss_on()) { + info._flags = ShaderKey::TF_map_gloss; + } else { + continue; + } + break; + case TextureStage::M_height: + if (parallax_mapping_samples > 0) { + info._flags = ShaderKey::TF_map_height; + } else { + continue; + } + break; } - if ((mode == TextureStage::M_glow)||(mode == TextureStage::M_modulate_glow)) { - _map_index_glow = i; - } - if ((mode == TextureStage::M_gloss)|| - (mode == TextureStage::M_modulate_gloss)|| - (mode == TextureStage::M_normal_gloss)) { - _map_index_gloss = i; - } - if (mode == TextureStage::M_height) { - _map_height_in_alpha = false; - } - if (mode == TextureStage::M_normal_height) { - _map_height_in_alpha = true; - } - if (tex_gen->has_stage(stage)) { - switch (tex_gen->get_mode(stage)) { - case TexGenAttrib::M_world_position: - _need_world_position = true; - break; - case TexGenAttrib::M_world_normal: - _need_world_normal = true; - break; - case TexGenAttrib::M_eye_position: - _need_eye_position = true; - break; - case TexGenAttrib::M_eye_normal: - _need_eye_normal = true; - break; - default: - break; + + // Check if this state has a texture matrix to transform the texture + // coordinates. + if (tex_matrix->has_stage(stage)) { + CPT(TransformState) transform = tex_matrix->get_transform(stage); + if (!transform->is_identity()) { + // Optimize for common case: if we only have a scale component, we + // can get away with fewer shader inputs and operations. + if (transform->has_components() && !transform->has_nonzero_shear() && + transform->get_pos() == LPoint3::zero() && + transform->get_hpr() == LVecBase3::zero()) { + info._flags |= ShaderKey::TF_has_texscale; + } else { + info._flags |= ShaderKey::TF_has_texmat; + } } } - } - // Determine whether we should normalize the normals. - /*const RescaleNormalAttrib *rescale; - rs->get_attrib_def(rescale); - - _normalize_normals = (rescale->get_mode() != RescaleNormalAttrib::M_none); - */ - // Actually, let's always normalize the normals for now. This helps to - // reduce combinatoric explosion of shaders. - _normalize_normals = true; - - // Decide which material modes need to be calculated. - - if (_lighting) { - _have_diffuse = true; - } - - if (_lighting && (_material_flags & Material::F_emission) != 0) { - _have_emission = true; - } - - if (_lighting) { - if (_material_flags & Material::F_specular) { - _have_specular = true; - } else if (_map_index_gloss >= 0) { - _have_specular = true; + if (tex_gen->has_stage(stage)) { + info._texcoord_name = nullptr; + info._gen_mode = tex_gen->get_mode(stage); + } else { + info._texcoord_name = stage->get_texcoord_name(); + info._gen_mode = TexGenAttrib::M_off; } - _need_eye_position = true; + // If we have this rare, special mode, just include a pointer to the + // TextureStage object, because I can't be bothered to bloat the shader + // key with all these extra relevant properties. + if (stage->get_mode() == TextureStage::M_combine) { + info._stage = stage; + } + + key._textures.push_back(info); + key._texture_flags |= info._flags; } // Decide whether to separate ambient and diffuse calculations. - - if (_have_ambient && _have_diffuse) { - if (_material_flags & Material::F_ambient) { - _separate_ambient_diffuse = true; + if (have_ambient) { + if (key._material_flags & Material::F_ambient) { + key._have_separate_ambient = true; } else { - if (_material_flags & Material::F_diffuse) { - _separate_ambient_diffuse = true; + if (key._material_flags & Material::F_diffuse) { + key._have_separate_ambient = true; } else { - _separate_ambient_diffuse = false; + key._have_separate_ambient = false; } } } - const LightRampAttrib *light_ramp; - if (_lighting && rs->get_attrib(light_ramp) && - (light_ramp->get_mode() != LightRampAttrib::LRT_identity)) { - _separate_ambient_diffuse = true; + if (shader_attrib->auto_ramp_on()) { + const LightRampAttrib *light_ramp; + if (rs->get_attrib(light_ramp)) { + key._light_ramp = light_ramp; + if (key._lighting) { + key._have_separate_ambient = true; + } + } } - // Do we want to use the ARB_shadow extension? This also allows us to use - // hardware shadows PCF. - - _use_shadow_filter = _gsg->get_supports_shadow_filter(); - - // Does the shader need material properties as input? - - _need_material_props = - (_have_ambient && (_material_flags & Material::F_ambient) != 0) || - (_have_diffuse && (_material_flags & Material::F_diffuse) != 0) || - (_have_emission && (_material_flags & Material::F_emission) != 0) || - (_have_specular && (_material_flags & Material::F_specular) != 0); - // Check for clip planes. - const ClipPlaneAttrib *clip_plane; rs->get_attrib_def(clip_plane); - _num_clip_planes = clip_plane->get_num_on_planes(); - if (_num_clip_planes > 0) { - _need_world_position = true; - } - - const ShaderAttrib *shader_attrib; - rs->get_attrib_def(shader_attrib); - if (shader_attrib->auto_shader()) { - _auto_normal_on = shader_attrib->auto_normal_on(); - _auto_glow_on = shader_attrib->auto_glow_on(); - _auto_gloss_on = shader_attrib->auto_gloss_on(); - _auto_ramp_on = shader_attrib->auto_ramp_on(); - _auto_shadow_on = shader_attrib->auto_shadow_on(); - } + key._num_clip_planes = clip_plane->get_num_on_planes(); // Check for fog. const FogAttrib *fog; if (rs->get_attrib(fog) && !fog->is_off()) { - _fog = true; + key._fog_mode = (int)fog->get_fog()->get_mode() + 1; } } -/** - * Called after analyze_renderstate to discard all the results of the - * analysis. This is generally done after shader generation is complete. - */ -void ShaderGenerator:: -clear_analysis() { - _vertex_colors = false; - _flat_colors = false; - _lighting = false; - _shadows = false; - _fog = false; - _have_ambient = false; - _have_diffuse = false; - _have_emission = false; - _have_specular = false; - _separate_ambient_diffuse = false; - _map_index_normal = -1; - _map_index_glow = -1; - _map_index_gloss = -1; - _map_index_height = -1; - _map_height_in_alpha = false; - _calc_primary_alpha = false; - _have_alpha_test = false; - _have_alpha_blend = false; - _subsume_alpha_test = false; - _disable_alpha_write = false; - _num_clip_planes = 0; - _use_shadow_filter = false; - _out_primary_glow = false; - _out_aux_normal = false; - _out_aux_glow = false; - _out_aux_any = false; - _material_flags = 0; - _need_material_props = false; - _need_world_position = false; - _need_world_normal = false; - _need_eye_position = false; - _need_eye_normal = false; - _normalize_normals = false; - _auto_normal_on = false; - _auto_glow_on = false; - _auto_gloss_on = false; - _auto_ramp_on = false; - _auto_shadow_on = false; - - _lights.clear(); - _lights_np.clear(); -} - -/** - * Creates a ShaderAttrib given a generated shader's body. Also inserts the - * lights into the shader attrib. - */ -CPT(RenderAttrib) ShaderGenerator:: -create_shader_attrib(const string &txt) { - PT(Shader) shader = Shader::make(txt, Shader::SL_Cg); - CPT(RenderAttrib) shattr = ShaderAttrib::make(shader); - - for (size_t i = 0; i < _lights.size(); ++i) { - shattr = DCAST(ShaderAttrib, shattr)->set_shader_input(InternalName::make("light", i), _lights_np[i]); - } - return shattr; -} - /** * This is the routine that implements the next-gen fixed function pipeline by * synthesizing a shader. It also takes care of setting up any buffers needed * to produce the requested effects. * - * Currently supports: - flat colors - vertex colors - lighting - normal maps, - * but not multiple - gloss maps, but not multiple - glow maps, but not - * multiple - materials, but not updates to materials - 2D textures - all - * texture stage modes, including combine modes - color scale attrib - light - * ramps (for cartoon shading) - shadow mapping - most texgen modes - - * texmatrix - 1D/2D/3D textures, cube textures, 2D tex arrays - - * linear/exp/exp2 fog - animation + * Currently supports: + * - flat colors + * - vertex colors + * - lighting + * - normal maps, but not multiple + * - gloss maps, but not multiple + * - glow maps, but not multiple + * - materials, but not updates to materials + * - 2D textures + * - all texture stage modes, including combine modes + * - color scale attrib + * - light ramps (for cartoon shading) + * - shadow mapping + * - most texgen modes + * - texmatrix + * - 1D/2D/3D textures, cube textures, 2D tex arrays + * - linear/exp/exp2 fog + * - animation * - * Not yet supported: - dot3_rgb and dot3_rgba combine modes + * Not yet supported: + * - dot3_rgb and dot3_rgba combine modes * - * Potential optimizations - omit attenuation calculations if attenuation off + * Potential optimizations + * - omit attenuation calculations if attenuation off * */ CPT(ShaderAttrib) ShaderGenerator:: synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { - analyze_renderstate(rs); + ShaderKey key; + + // First look up the state key in the table of already generated shaders. + { + PStatTimer timer(lookup_collector); + key._anim_spec = anim; + analyze_renderstate(key, rs); + + GeneratedShaders::const_iterator si; + si = _generated_shaders.find(key); + if (si != _generated_shaders.end()) { + // We've already generated a shader for this state. + return si->second; + } + } + + PStatTimer timer(synthesize_collector); + reset_register_allocator(); if (pgraphnodes_cat.is_debug()) { @@ -556,7 +552,7 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { normal_vreg = "NORMAL"; } - if (_vertex_colors) { + if (key._color_type == ColorAttrib::T_vertex) { // Reserve COLOR0 color_vreg = _use_generic_attr ? "ATTR3" : "COLOR0"; _vcregs_used = 1; @@ -573,32 +569,65 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { rs->write(text, 2); text << "*/\n"; + int map_index_normal = -1; + int map_index_glow = -1; + int map_index_gloss = -1; + + // Figure out whether we need to calculate any of these variables. + bool need_world_position = (key._num_clip_planes > 0); + bool need_world_normal = false; + bool need_eye_position = key._lighting; + bool need_eye_normal = !key._lights.empty() || ((key._outputs & AuxBitplaneAttrib::ABO_aux_normal) != 0); + + bool have_specular = false; + if (key._lighting) { + if (key._material_flags & Material::F_specular) { + have_specular = true; + } else if ((key._texture_flags & ShaderKey::TF_map_gloss) != 0) { + have_specular = true; + } + } + text << "void vshader(\n"; - const TextureAttrib *texture = DCAST(TextureAttrib, rs->get_attrib_def(TextureAttrib::get_class_slot())); - const TexGenAttrib *tex_gen = DCAST(TexGenAttrib, rs->get_attrib_def(TexGenAttrib::get_class_slot())); - for (int i = 0; i < _num_textures; ++i) { - TextureStage *stage = texture->get_on_stage(i); - if (!tex_gen->has_stage(stage)) { - const InternalName *texcoord_name = stage->get_texcoord_name(); + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; - if (texcoord_fregs.count(texcoord_name) == 0) { + switch (tex._gen_mode) { + case TexGenAttrib::M_world_position: + need_world_position = true; + break; + case TexGenAttrib::M_world_normal: + need_world_normal = true; + break; + case TexGenAttrib::M_eye_position: + need_eye_position = true; + break; + case TexGenAttrib::M_eye_normal: + need_eye_normal = true; + break; + default: + break; + } + + if (tex._texcoord_name != nullptr) { + if (texcoord_fregs.count(tex._texcoord_name) == 0) { const char *freg = alloc_freg(); - string tcname = texcoord_name->join("_"); - texcoord_fregs[texcoord_name] = freg; + texcoord_fregs[tex._texcoord_name] = freg; + string tcname = tex._texcoord_name->join("_"); text << "\t in float4 vtx_" << tcname << " : " << alloc_vreg() << ",\n"; text << "\t out float4 l_" << tcname << " : " << freg << ",\n"; } } - if ((_map_index_normal == i && (_lighting || _out_aux_normal) && _auto_normal_on) || _map_index_height == i) { - const InternalName *texcoord_name = stage->get_texcoord_name(); + if (tex._flags & (ShaderKey::TF_map_normal | ShaderKey::TF_map_height)) { PT(InternalName) tangent_name = InternalName::get_tangent(); PT(InternalName) binormal_name = InternalName::get_binormal(); - if (texcoord_name != InternalName::get_texcoord()) { - tangent_name = tangent_name->append(texcoord_name->get_basename()); - binormal_name = binormal_name->append(texcoord_name->get_basename()); + if (tex._texcoord_name != nullptr && + tex._texcoord_name != InternalName::get_texcoord()) { + tangent_name = tangent_name->append(tex._texcoord_name->get_basename()); + binormal_name = binormal_name->append(tex._texcoord_name->get_basename()); } tangent_input = tangent_name->join("_"); binormal_input = binormal_name->join("_"); @@ -606,84 +635,87 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t in float4 vtx_" << tangent_input << " : " << alloc_vreg() << ",\n"; text << "\t in float4 vtx_" << binormal_input << " : " << alloc_vreg() << ",\n"; - if (_map_index_normal == i && (_lighting || _out_aux_normal) && _auto_normal_on) { + if (tex._flags & ShaderKey::TF_map_normal) { + map_index_normal = i; tangent_freg = alloc_freg(); binormal_freg = alloc_freg(); text << "\t out float4 l_tangent : " << tangent_freg << ",\n"; text << "\t out float4 l_binormal : " << binormal_freg << ",\n"; } } + + if (tex._flags & ShaderKey::TF_map_glow) { + map_index_glow = i; + } + if (tex._flags & ShaderKey::TF_map_gloss) { + map_index_gloss = i; + } } - if (_vertex_colors) { + if (key._color_type == ColorAttrib::T_vertex) { text << "\t in float4 vtx_color : " << color_vreg << ",\n"; text << "\t out float4 l_color : COLOR0,\n"; } - if (_need_world_position || _need_world_normal) { + if (need_world_position || need_world_normal) { text << "\t uniform float4x4 trans_model_to_world,\n"; } - if (_need_world_position) { + if (need_world_position) { world_position_freg = alloc_freg(); text << "\t out float4 l_world_position : " << world_position_freg << ",\n"; } - if (_need_world_normal) { + if (need_world_normal) { world_normal_freg = alloc_freg(); text << "\t out float4 l_world_normal : " << world_normal_freg << ",\n"; } - if (_need_eye_position) { + if (need_eye_position) { text << "\t uniform float4x4 trans_model_to_view,\n"; eye_position_freg = alloc_freg(); text << "\t out float4 l_eye_position : " << eye_position_freg << ",\n"; - } else if ((_lighting || _out_aux_normal) && (_map_index_normal >= 0 && _auto_normal_on)) { + } else if (key._texture_flags & ShaderKey::TF_map_normal) { text << "\t uniform float4x4 trans_model_to_view,\n"; } - if (_need_eye_normal) { + if (need_eye_normal) { eye_normal_freg = alloc_freg(); text << "\t uniform float4x4 tpose_view_to_model,\n"; text << "\t out float4 l_eye_normal : " << eye_normal_freg << ",\n"; } - if (_map_index_height >= 0 || _need_world_normal || _need_eye_normal) { + if ((key._texture_flags & ShaderKey::TF_map_height) != 0 || need_world_normal || need_eye_normal) { text << "\t in float3 vtx_normal : " << normal_vreg << ",\n"; } - if (_map_index_height >= 0) { + if (key._texture_flags & ShaderKey::TF_map_height) { text << "\t uniform float4 mspos_view,\n"; text << "\t out float3 l_eyevec,\n"; } - if (_lighting && _shadows && _auto_shadow_on) { - for (size_t i = 0; i < _lights.size(); ++i) { - if (_lights[i]->_shadow_caster) { - lightcoord_fregs.push_back(alloc_freg()); - if (_lights[i]->is_of_type(PointLight::get_class_type())) { - text << "\t uniform float4x4 trans_model_to_light" << i << ",\n"; - } else { - text << "\t uniform float4x4 trans_model_to_clip_of_light" << i << ",\n"; - } - text << "\t out float4 l_lightcoord" << i << " : " << lightcoord_fregs[i] << ",\n"; - } else { - lightcoord_fregs.push_back(NULL); - } + for (size_t i = 0; i < key._lights.size(); ++i) { + const ShaderKey::LightInfo &light = key._lights[i]; + if (light._flags & ShaderKey::LF_has_shadows) { + lightcoord_fregs.push_back(alloc_freg()); + text << "\t uniform float4x4 mat_shadow_" << i << ",\n"; + text << "\t out float4 l_lightcoord" << i << " : " << lightcoord_fregs[i] << ",\n"; + } else { + lightcoord_fregs.push_back(nullptr); } } - if (_fog) { + if (key._fog_mode != 0) { hpos_freg = alloc_freg(); text << "\t out float4 l_hpos : " << hpos_freg << ",\n"; } - if (anim.get_animation_type() == GeomEnums::AT_hardware && - anim.get_num_transforms() > 0) { + if (key._anim_spec.get_animation_type() == GeomEnums::AT_hardware && + key._anim_spec.get_num_transforms() > 0) { int num_transforms; - if (anim.get_indexed_transforms()) { + if (key._anim_spec.get_indexed_transforms()) { num_transforms = 120; } else { - num_transforms = anim.get_num_transforms(); + num_transforms = key._anim_spec.get_num_transforms(); } - if (transform_weight_vreg == NULL) { + if (transform_weight_vreg == nullptr) { transform_weight_vreg = alloc_vreg(); } - if (transform_index_vreg == NULL) { + if (transform_index_vreg == nullptr) { transform_index_vreg = alloc_vreg(); } text << "\t uniform float4x4 tbl_transforms[" << num_transforms << "],\n"; text << "\t in float4 vtx_transform_weight : " << transform_weight_vreg << ",\n"; - if (anim.get_indexed_transforms()) { + if (key._anim_spec.get_indexed_transforms()) { text << "\t in uint4 vtx_transform_index : " << transform_index_vreg << ",\n"; } } @@ -692,50 +724,46 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t uniform float4x4 mat_modelproj\n"; text << ") {\n"; - if (anim.get_animation_type() == GeomEnums::AT_hardware && - anim.get_num_transforms() > 0) { + if (key._anim_spec.get_animation_type() == GeomEnums::AT_hardware && + key._anim_spec.get_num_transforms() > 0) { - if (!anim.get_indexed_transforms()) { + if (!key._anim_spec.get_indexed_transforms()) { text << "\t const uint4 vtx_transform_index = uint4(0, 1, 2, 3);\n"; } text << "\t float4x4 matrix = tbl_transforms[vtx_transform_index.x] * vtx_transform_weight.x"; - if (anim.get_num_transforms() > 1) { + if (key._anim_spec.get_num_transforms() > 1) { text << "\n\t + tbl_transforms[vtx_transform_index.y] * vtx_transform_weight.y"; } - if (anim.get_num_transforms() > 2) { + if (key._anim_spec.get_num_transforms() > 2) { text << "\n\t + tbl_transforms[vtx_transform_index.z] * vtx_transform_weight.z"; } - if (anim.get_num_transforms() > 3) { + if (key._anim_spec.get_num_transforms() > 3) { text << "\n\t + tbl_transforms[vtx_transform_index.w] * vtx_transform_weight.w"; } text << ";\n"; text << "\t vtx_position = mul(matrix, vtx_position);\n"; - if (_need_world_normal || _need_eye_normal) { + if (need_world_normal || need_eye_normal) { text << "\t vtx_normal = mul((float3x3)matrix, vtx_normal);\n"; } } text << "\t l_position = mul(mat_modelproj, vtx_position);\n"; - if (_fog) { + if (key._fog_mode != 0) { text << "\t l_hpos = l_position;\n"; } - if (_need_world_position) { + if (need_world_position) { text << "\t l_world_position = mul(trans_model_to_world, vtx_position);\n"; } - if (_need_world_normal) { + if (need_world_normal) { text << "\t l_world_normal = mul(trans_model_to_world, float4(vtx_normal, 0));\n"; } - if (_need_eye_position) { + if (need_eye_position) { text << "\t l_eye_position = mul(trans_model_to_view, vtx_position);\n"; } - if (_need_eye_normal) { - if (_normalize_normals) { - text << "\t l_eye_normal.xyz = normalize(mul((float3x3)tpose_view_to_model, vtx_normal));\n"; - } else { - text << "\t l_eye_normal.xyz = mul((float3x3)tpose_view_to_model, vtx_normal);\n"; - } + if (need_eye_normal) { + text << "\t l_eye_normal.xyz = normalize(mul((float3x3)tpose_view_to_model, vtx_normal));\n"; text << "\t l_eye_normal.w = 0;\n"; } pmap::const_iterator it; @@ -744,28 +772,21 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { string tcname = it->first->join("_"); text << "\t l_" << tcname << " = vtx_" << tcname << ";\n"; } - if (_vertex_colors) { + if (key._color_type == ColorAttrib::T_vertex) { text << "\t l_color = vtx_color;\n"; } - if ((_lighting || _out_aux_normal) && (_map_index_normal >= 0 && _auto_normal_on)) { + if (key._texture_flags & ShaderKey::TF_map_normal) { text << "\t l_tangent.xyz = normalize(mul((float3x3)trans_model_to_view, vtx_" << tangent_input << ".xyz));\n"; text << "\t l_tangent.w = 0;\n"; text << "\t l_binormal.xyz = normalize(mul((float3x3)trans_model_to_view, -vtx_" << binormal_input << ".xyz));\n"; text << "\t l_binormal.w = 0;\n"; } - if (_shadows && _auto_shadow_on) { - text << "\t float4x4 biasmat = {0.5f, 0.0f, 0.0f, 0.5f, 0.0f, 0.5f, 0.0f, 0.5f, 0.0f, 0.0f, 0.5f, 0.5f, 0.0f, 0.0f, 0.0f, 1.0f};\n"; - for (size_t i = 0; i < _lights.size(); ++i) { - if (_lights[i]->_shadow_caster) { - if (_lights[i]->is_of_type(PointLight::get_class_type())) { - text << "\t l_lightcoord" << i << " = mul(trans_model_to_light" << i << ", vtx_position);\n"; - } else { - text << "\t l_lightcoord" << i << " = mul(biasmat, mul(trans_model_to_clip_of_light" << i << ", vtx_position));\n"; - } - } + for (size_t i = 0; i < key._lights.size(); ++i) { + if (key._lights[i]._flags & ShaderKey::LF_has_shadows) { + text << "\t l_lightcoord" << i << " = mul(mat_shadow_" << i << ", l_eye_position);\n"; } } - if (_map_index_height >= 0) { + if (key._texture_flags & ShaderKey::TF_map_height) { text << "\t float3 eyedir = mspos_view.xyz - vtx_position.xyz;\n"; text << "\t l_eyevec.x = dot(vtx_" << tangent_input << ".xyz, eyedir);\n"; text << "\t l_eyevec.y = dot(vtx_" << binormal_input << ".xyz, eyedir);\n"; @@ -777,142 +798,144 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { // Fragment shader text << "void fshader(\n"; - if (_fog) { + if (key._fog_mode != 0) { text << "\t in float4 l_hpos : " << hpos_freg << ",\n"; text << "\t in uniform float4 attr_fog,\n"; text << "\t in uniform float4 attr_fogcolor,\n"; } - if (_need_world_position) { + if (need_world_position) { text << "\t in float4 l_world_position : " << world_position_freg << ",\n"; } - if (_need_world_normal) { + if (need_world_normal) { text << "\t in float4 l_world_normal : " << world_normal_freg << ",\n"; } - if (_need_eye_position) { + if (need_eye_position) { text << "\t in float4 l_eye_position : " << eye_position_freg << ",\n"; } - if (_need_eye_normal) { + if (need_eye_normal) { text << "\t in float4 l_eye_normal : " << eye_normal_freg << ",\n"; } for (it = texcoord_fregs.begin(); it != texcoord_fregs.end(); ++it) { text << "\t in float4 l_" << it->first->join("_") << " : " << it->second << ",\n"; } - const TexMatrixAttrib *tex_matrix = DCAST(TexMatrixAttrib, rs->get_attrib_def(TexMatrixAttrib::get_class_slot())); - for (int i = 0; i < _num_textures; ++i) { - TextureStage *stage = texture->get_on_stage(i); - Texture::TextureType type = texture->get_on_texture_type(stage); - text << "\t uniform sampler" << texture_type_as_string(type) << " tex_" << i << ",\n"; - if (tex_matrix->has_stage(stage)) { + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + text << "\t uniform sampler" << texture_type_as_string(tex._type) << " tex_" << i << ",\n"; + + if (tex._flags & ShaderKey::TF_has_texscale) { + text << "\t uniform float3 texscale_" << i << ",\n"; + } else if (tex._flags & ShaderKey::TF_has_texmat) { text << "\t uniform float4x4 texmat_" << i << ",\n"; } + + if (tex._mode == TextureStage::M_blend) { + text << "\t uniform float4 texcolor_" << i << ",\n"; + } } - if ((_lighting || _out_aux_normal) && (_map_index_normal >= 0 && _auto_normal_on)) { + if (key._texture_flags & ShaderKey::TF_map_normal) { text << "\t in float3 l_tangent : " << tangent_freg << ",\n"; text << "\t in float3 l_binormal : " << binormal_freg << ",\n"; } - if (_lighting) { - for (size_t i = 0; i < _lights.size(); ++i) { - if (_lights[i]->is_of_type(DirectionalLight::get_class_type())) { - text << "\t uniform float4x4 dlight_light" << i << "_rel_view,\n"; + for (size_t i = 0; i < key._lights.size(); ++i) { + text << "\t uniform float4x4 attr_light" << i << ",\n"; - } else if (_lights[i]->is_of_type(PointLight::get_class_type())) { - text << "\t uniform float4x4 plight_light" << i << "_rel_view,\n"; - - } else if (_lights[i]->is_of_type(Spotlight::get_class_type())) { - text << "\t uniform float4x4 slight_light" << i << "_rel_view,\n"; - text << "\t uniform float4 satten_light" << i << ",\n"; - } - - if (_shadows && _lights[i]->_shadow_caster && _auto_shadow_on) { - if (_lights[i]->is_of_type(PointLight::get_class_type())) { - text << "\t uniform samplerCUBE shadow_light" << i << ",\n"; - } else if (_use_shadow_filter) { - text << "\t uniform sampler2DShadow shadow_light" << i << ",\n"; - } else { - text << "\t uniform sampler2D shadow_light" << i << ",\n"; - } - text << "\t in float4 l_lightcoord" << i << " : " << lightcoord_fregs[i] << ",\n"; - } - } - if (_need_material_props) { - text << "\t uniform float4x4 attr_material,\n"; - } - if (_have_specular) { - if (_material_flags & Material::F_local) { - text << "\t uniform float4 mspos_view,\n"; + const ShaderKey::LightInfo &light = key._lights[i]; + if (light._flags & ShaderKey::LF_has_shadows) { + if (light._type.is_derived_from(PointLight::get_class_type())) { + text << "\t uniform samplerCUBE shadow_" << i << ",\n"; + } else if (_use_shadow_filter) { + text << "\t uniform sampler2DShadow shadow_" << i << ",\n"; } else { - text << "\t uniform float4 row1_view_to_model,\n"; + text << "\t uniform sampler2D shadow_" << i << ",\n"; } + text << "\t in float4 l_lightcoord" << i << " : " << lightcoord_fregs[i] << ",\n"; + } + if (light._flags & ShaderKey::LF_has_specular_color) { + text << "\t uniform float4 attr_lspec" << i << ",\n"; } } - if (_map_index_height >= 0) { + + // Does the shader need material properties as input? + if (key._material_flags & (Material::F_ambient | Material::F_diffuse | Material::F_emission | Material::F_specular)) { + text << "\t uniform float4x4 attr_material,\n"; + } + if (key._texture_flags & ShaderKey::TF_map_height) { text << "\t float3 l_eyevec,\n"; } - if (_out_aux_any) { + if (key._outputs & (AuxBitplaneAttrib::ABO_aux_normal | AuxBitplaneAttrib::ABO_aux_glow)) { text << "\t out float4 o_aux : COLOR1,\n"; } text << "\t out float4 o_color : COLOR0,\n"; - if (_vertex_colors) { + + if (key._color_type == ColorAttrib::T_vertex) { text << "\t in float4 l_color : COLOR0,\n"; - } else { + } else if (key._color_type == ColorAttrib::T_flat) { text << "\t uniform float4 attr_color,\n"; } - for (int i=0; i<_num_clip_planes; ++i) { + + for (int i = 0; i < key._num_clip_planes; ++i) { text << "\t uniform float4 clipplane_" << i << ",\n"; } + text << "\t uniform float4 attr_ambient,\n"; text << "\t uniform float4 attr_colorscale\n"; text << ") {\n"; + // Clipping first! - for (int i=0; i<_num_clip_planes; ++i) { + for (int i = 0; i < key._num_clip_planes; ++i) { text << "\t if (l_world_position.x * clipplane_" << i << ".x + l_world_position.y "; text << "* clipplane_" << i << ".y + l_world_position.z * clipplane_" << i << ".z + clipplane_" << i << ".w <= 0) {\n"; text << "\t discard;\n"; text << "\t }\n"; } text << "\t float4 result;\n"; - if (_out_aux_any) { + if (key._outputs & (AuxBitplaneAttrib::ABO_aux_normal | AuxBitplaneAttrib::ABO_aux_glow)) { text << "\t o_aux = float4(0, 0, 0, 0);\n"; } // Now generate any texture coordinates according to TexGenAttrib. If it // has a TexMatrixAttrib, also transform them. - for (int i=0; i<_num_textures; i++) { - TextureStage *stage = texture->get_on_stage(i); - if (tex_gen != NULL && tex_gen->has_stage(stage)) { - switch (tex_gen->get_mode(stage)) { - case TexGenAttrib::M_world_position: - text << "\t float4 texcoord" << i << " = l_world_position;\n"; - break; - case TexGenAttrib::M_world_normal: - text << "\t float4 texcoord" << i << " = l_world_normal;\n"; - break; - case TexGenAttrib::M_eye_position: - text << "\t float4 texcoord" << i << " = l_eye_position;\n"; - break; - case TexGenAttrib::M_eye_normal: - text << "\t float4 texcoord" << i << " = l_eye_normal;\n"; - text << "\t texcoord" << i << ".w = 1.0f;\n"; - break; - default: - pgraphnodes_cat.error() << "Unsupported TexGenAttrib mode\n"; - text << "\t float4 texcoord" << i << " = float4(0, 0, 0, 0);\n"; - } - } else { + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + switch (tex._gen_mode) { + case TexGenAttrib::M_off: // Cg seems to be able to optimize this temporary away when appropriate. - const InternalName *texcoord_name = stage->get_texcoord_name(); - text << "\t float4 texcoord" << i << " = l_" << texcoord_name->join("_") << ";\n"; + text << "\t float4 texcoord" << i << " = l_" << tex._texcoord_name->join("_") << ";\n"; + break; + case TexGenAttrib::M_world_position: + text << "\t float4 texcoord" << i << " = l_world_position;\n"; + break; + case TexGenAttrib::M_world_normal: + text << "\t float4 texcoord" << i << " = l_world_normal;\n"; + break; + case TexGenAttrib::M_eye_position: + text << "\t float4 texcoord" << i << " = l_eye_position;\n"; + break; + case TexGenAttrib::M_eye_normal: + text << "\t float4 texcoord" << i << " = l_eye_normal;\n"; + text << "\t texcoord" << i << ".w = 1.0f;\n"; + break; + default: + text << "\t float4 texcoord" << i << " = float4(0, 0, 0, 0);\n"; + pgraphnodes_cat.error() + << "Unsupported TexGenAttrib mode: " << tex._gen_mode << "\n"; } - if (tex_matrix != NULL && tex_matrix->has_stage(stage)) { + if (tex._flags & ShaderKey::TF_has_texscale) { + text << "\t texcoord" << i << ".xyz *= texscale_" << i << ";\n"; + } else if (tex._flags & ShaderKey::TF_has_texmat) { text << "\t texcoord" << i << " = mul(texmat_" << i << ", texcoord" << i << ");\n"; text << "\t texcoord" << i << ".xyz /= texcoord" << i << ".w;\n"; } } text << "\t // Fetch all textures.\n"; - if (_map_index_height >= 0 && parallax_mapping_samples > 0) { - Texture::TextureType type = texture->get_on_texture_type(texture->get_on_stage(_map_index_height)); - text << "\t float4 tex" << _map_index_height << " = tex" << texture_type_as_string(type); - text << "(tex_" << _map_index_height << ", texcoord" << _map_index_height << "."; - switch (type) { + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + if ((tex._flags & ShaderKey::TF_map_height) == 0) { + continue; + } + + text << "\t float4 tex" << i << " = tex" << texture_type_as_string(tex._type); + text << "(tex_" << i << ", texcoord" << i << "."; + switch (tex._type) { case Texture::TT_cube_map: case Texture::TT_3d_texture: case Texture::TT_2d_texture_array: @@ -927,17 +950,19 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { default: break; } - text << ");\n\t float3 parallax_offset = l_eyevec.xyz * (tex" << _map_index_height; - if (_map_height_in_alpha) { + text << ");\n\t float3 parallax_offset = l_eyevec.xyz * (tex" << i; + if (tex._mode == TextureStage::M_normal_height || + (tex._flags & ShaderKey::TF_has_alpha) != 0) { text << ".aaa"; } else { text << ".rgb"; } text << " * 2.0 - 1.0) * " << parallax_mapping_scale << ";\n"; // Additional samples - for (int i=0; iget_on_texture_type(texture->get_on_stage(i)); + for (size_t i = 0; i < key._textures.size(); ++i) { + ShaderKey::TextureInfo &tex = key._textures[i]; + if ((tex._flags & ShaderKey::TF_map_height) == 0) { // Parallax mapping pushes the texture coordinates of the other textures // away from the camera. - if (_map_index_height >= 0 && parallax_mapping_samples > 0) { + if (key._texture_flags & ShaderKey::TF_map_height) { text << "\t texcoord" << i << ".xyz -= parallax_offset;\n"; } - text << "\t float4 tex" << i << " = tex" << texture_type_as_string(type); + text << "\t float4 tex" << i << " = tex" << texture_type_as_string(tex._type); text << "(tex_" << i << ", texcoord" << i << "."; - switch (type) { + switch (tex._type) { case Texture::TT_cube_map: case Texture::TT_3d_texture: case Texture::TT_2d_texture_array: @@ -973,108 +998,103 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << ");\n"; } } - if (_lighting || _out_aux_normal) { - if (_map_index_normal >= 0 && _auto_normal_on) { - text << "\t // Translate tangent-space normal in map to view-space.\n"; - text << "\t float3 tsnormal = ((float3)tex" << _map_index_normal << " * 2) - 1;\n"; - text << "\t l_eye_normal.xyz *= tsnormal.z;\n"; - text << "\t l_eye_normal.xyz += l_tangent * tsnormal.x;\n"; - text << "\t l_eye_normal.xyz += l_binormal * tsnormal.y;\n"; - } + if (key._texture_flags & ShaderKey::TF_map_normal) { + text << "\t // Translate tangent-space normal in map to view-space.\n"; + text << "\t float3 tsnormal = ((float3)tex" << map_index_normal << " * 2) - 1;\n"; + text << "\t l_eye_normal.xyz *= tsnormal.z;\n"; + text << "\t l_eye_normal.xyz += l_tangent * tsnormal.x;\n"; + text << "\t l_eye_normal.xyz += l_binormal * tsnormal.y;\n"; } - if (_need_eye_normal) { + if (need_eye_normal) { text << "\t // Correct the surface normal for interpolation effects\n"; text << "\t l_eye_normal.xyz = normalize(l_eye_normal.xyz);\n"; } - if (_out_aux_normal) { + if (key._outputs & AuxBitplaneAttrib::ABO_aux_normal) { text << "\t // Output the camera-space surface normal\n"; text << "\t o_aux.rgb = (l_eye_normal.xyz*0.5) + float3(0.5,0.5,0.5);\n"; } - if (_lighting) { + if (key._lighting) { text << "\t // Begin view-space light calculations\n"; - text << "\t float ldist,lattenv,langle;\n"; + text << "\t float ldist,lattenv,langle,lshad;\n"; text << "\t float4 lcolor,lspec,lpoint,latten,ldir,leye;\n"; text << "\t float3 lvec,lhalf;\n"; - if (_shadows && _auto_shadow_on) { - text << "\t float lshad;\n"; + if (key._have_separate_ambient) { + text << "\t float4 tot_ambient = float4(0,0,0,0);\n"; } - if (_separate_ambient_diffuse) { - if (_have_ambient) { - text << "\t float4 tot_ambient = float4(0,0,0,0);\n"; - } - if (_have_diffuse) { - text << "\t float4 tot_diffuse = float4(0,0,0,0);\n"; - } - } else { - if (_have_ambient || _have_diffuse) { - text << "\t float4 tot_diffuse = float4(0,0,0,0);\n"; - } - } - if (_have_specular) { + text << "\t float4 tot_diffuse = float4(0,0,0,0);\n"; + if (have_specular) { text << "\t float4 tot_specular = float4(0,0,0,0);\n"; - if (_material_flags & Material::F_specular) { + if (key._material_flags & Material::F_specular) { text << "\t float shininess = attr_material[3].w;\n"; } else { text << "\t float shininess = 50; // no shininess specified, using default\n"; } } - if (_separate_ambient_diffuse && _have_ambient) { + if (key._have_separate_ambient) { text << "\t tot_ambient += attr_ambient;\n"; - } else if(_have_diffuse) { + } else { text << "\t tot_diffuse += attr_ambient;\n"; } } - for (size_t i = 0; i < _lights.size(); ++i) { - if (_lights[i]->is_of_type(DirectionalLight::get_class_type())) { + for (size_t i = 0; i < key._lights.size(); ++i) { + const ShaderKey::LightInfo &light = key._lights[i]; + if (light._type.is_derived_from(DirectionalLight::get_class_type())) { text << "\t // Directional Light " << i << "\n"; - text << "\t lcolor = dlight_light" << i << "_rel_view[0];\n"; - text << "\t lspec = dlight_light" << i << "_rel_view[1];\n"; - text << "\t lvec = dlight_light" << i << "_rel_view[2].xyz;\n"; + text << "\t lcolor = attr_light" << i << "[0];\n"; + if (light._flags & ShaderKey::LF_has_specular_color) { + text << "\t lspec = attr_lspec" << i << ";\n"; + } else { + text << "\t lspec = lcolor;\n"; + } + text << "\t lvec = attr_light" << i << "[3].xyz;\n"; text << "\t lcolor *= saturate(dot(l_eye_normal.xyz, lvec.xyz));\n"; - if (_shadows && _lights[i]->_shadow_caster && _auto_shadow_on) { + if (light._flags & ShaderKey::LF_has_shadows) { if (_use_shadow_filter) { - text << "\t lshad = shadow2DProj(shadow_light" << i << ", l_lightcoord" << i << ").r;\n"; + text << "\t lshad = shadow2DProj(shadow_" << i << ", l_lightcoord" << i << ").r;\n"; } else { - text << "\t lshad = tex2Dproj(shadow_light" << i << ", l_lightcoord" << i << ").r > l_lightcoord" << i << ".z / l_lightcoord" << i << ".w;\n"; + text << "\t lshad = tex2Dproj(shadow_" << i << ", l_lightcoord" << i << ").r > l_lightcoord" << i << ".z / l_lightcoord" << i << ".w;\n"; } text << "\t lcolor *= lshad;\n"; text << "\t lspec *= lshad;\n"; } - if (_have_diffuse) { - text << "\t tot_diffuse += lcolor;\n"; - } - if (_have_specular) { - if (_material_flags & Material::F_local) { + text << "\t tot_diffuse += lcolor;\n"; + if (have_specular) { + if (key._material_flags & Material::F_local) { text << "\t lhalf = normalize(lvec - normalize(l_eye_position.xyz));\n"; } else { - text << "\t lhalf = dlight_light" << i << "_rel_view[3].xyz;\n"; + text << "\t lhalf = normalize(lvec - float3(0, 1, 0));\n"; } text << "\t lspec *= pow(saturate(dot(l_eye_normal.xyz, lhalf)), shininess);\n"; text << "\t tot_specular += lspec;\n"; } - } else if (_lights[i]->is_of_type(PointLight::get_class_type())) { + } else if (light._type.is_derived_from(PointLight::get_class_type())) { text << "\t // Point Light " << i << "\n"; - text << "\t lcolor = plight_light" << i << "_rel_view[0];\n"; - text << "\t lspec = plight_light" << i << "_rel_view[1];\n"; - text << "\t lpoint = plight_light" << i << "_rel_view[2];\n"; - text << "\t latten = plight_light" << i << "_rel_view[3];\n"; + text << "\t lcolor = attr_light" << i << "[0];\n"; + if (light._flags & ShaderKey::LF_has_specular_color) { + text << "\t lspec = attr_lspec" << i << ";\n"; + } else { + text << "\t lspec = lcolor;\n"; + } + text << "\t latten = attr_light" << i << "[1];\n"; + text << "\t lpoint = attr_light" << i << "[3];\n"; text << "\t lvec = lpoint.xyz - l_eye_position.xyz;\n"; text << "\t ldist = length(lvec);\n"; text << "\t lvec /= ldist;\n"; + if (light._type.is_derived_from(SphereLight::get_class_type())) { + text << "\t ldist = max(ldist, attr_light" << i << "[2].w);\n"; + } text << "\t lattenv = 1/(latten.x + latten.y*ldist + latten.z*ldist*ldist);\n"; text << "\t lcolor *= lattenv * saturate(dot(l_eye_normal.xyz, lvec));\n"; - if (_shadows && _lights[i]->_shadow_caster && _auto_shadow_on) { + if (light._flags & ShaderKey::LF_has_shadows) { text << "\t ldist = max(abs(l_lightcoord" << i << ".x), max(abs(l_lightcoord" << i << ".y), abs(l_lightcoord" << i << ".z)));\n"; text << "\t ldist = ((latten.w+lpoint.w)/(latten.w-lpoint.w))+((-2*latten.w*lpoint.w)/(ldist * (latten.w-lpoint.w)));\n"; - text << "\t lshad = texCUBE(shadow_light" << i << ", l_lightcoord" << i << ".xyz).r >= ldist * 0.5 + 0.5;\n"; + text << "\t lshad = texCUBE(shadow_" << i << ", l_lightcoord" << i << ".xyz).r >= ldist * 0.5 + 0.5;\n"; text << "\t lcolor *= lshad;\n"; text << "\t lspec *= lshad;\n"; } - if (_have_diffuse) { - text << "\t tot_diffuse += lcolor;\n"; - } - if (_have_specular) { - if (_material_flags & Material::F_local) { + text << "\t tot_diffuse += lcolor;\n"; + if (have_specular) { + if (key._material_flags & Material::F_local) { text << "\t lhalf = normalize(lvec - normalize(l_eye_position.xyz));\n"; } else { text << "\t lhalf = normalize(lvec - float3(0, 1, 0));\n"; @@ -1083,13 +1103,17 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t lspec *= pow(saturate(dot(l_eye_normal.xyz, lhalf)), shininess);\n"; text << "\t tot_specular += lspec;\n"; } - } else if (_lights[i]->is_of_type(Spotlight::get_class_type())) { + } else if (light._type.is_derived_from(Spotlight::get_class_type())) { text << "\t // Spot Light " << i << "\n"; - text << "\t lcolor = slight_light" << i << "_rel_view[0];\n"; - text << "\t lspec = slight_light" << i << "_rel_view[1];\n"; - text << "\t lpoint = slight_light" << i << "_rel_view[2];\n"; - text << "\t ldir = slight_light" << i << "_rel_view[3];\n"; - text << "\t latten = satten_light" << i << ";\n"; + text << "\t lcolor = attr_light" << i << "[0];\n"; + if (light._flags & ShaderKey::LF_has_specular_color) { + text << "\t lspec = attr_lspec" << i << ";\n"; + } else { + text << "\t lspec = lcolor;\n"; + } + text << "\t latten = attr_light" << i << "[1];\n"; + text << "\t ldir = attr_light" << i << "[2];\n"; + text << "\t lpoint = attr_light" << i << "[3];\n"; text << "\t lvec = lpoint.xyz - l_eye_position.xyz;\n"; text << "\t ldist = length(lvec);\n"; text << "\t lvec /= ldist;\n"; @@ -1098,21 +1122,19 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { text << "\t lattenv *= pow(langle, latten.w);\n"; text << "\t if (langle < ldir.w) lattenv = 0;\n"; text << "\t lcolor *= lattenv * saturate(dot(l_eye_normal.xyz, lvec));\n"; - if (_shadows && _lights[i]->_shadow_caster && _auto_shadow_on) { + if (light._flags & ShaderKey::LF_has_shadows) { if (_use_shadow_filter) { - text << "\t lshad = shadow2DProj(shadow_light" << i << ", l_lightcoord" << i << ").r;\n"; + text << "\t lshad = shadow2DProj(shadow_" << i << ", l_lightcoord" << i << ").r;\n"; } else { - text << "\t lshad = tex2Dproj(shadow_light" << i << ", l_lightcoord" << i << ").r > l_lightcoord" << i << ".z / l_lightcoord" << i << ".w;\n"; + text << "\t lshad = tex2Dproj(shadow_" << i << ", l_lightcoord" << i << ").r > l_lightcoord" << i << ".z / l_lightcoord" << i << ".w;\n"; } text << "\t lcolor *= lshad;\n"; text << "\t lspec *= lshad;\n"; } - if (_have_diffuse) { - text << "\t tot_diffuse += lcolor;\n"; - } - if (_have_specular) { - if (_material_flags & Material::F_local) { + text << "\t tot_diffuse += lcolor;\n"; + if (have_specular) { + if (key._material_flags & Material::F_local) { text << "\t lhalf = normalize(lvec - normalize(l_eye_position.xyz));\n"; } else { text << "\t lhalf = normalize(lvec - float3(0,1,0));\n"; @@ -1123,14 +1145,13 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } } } - if (_lighting) { - const LightRampAttrib *light_ramp = DCAST(LightRampAttrib, rs->get_attrib_def(LightRampAttrib::get_class_slot())); - if (_auto_ramp_on && _have_diffuse) { - switch (light_ramp->get_mode()) { + if (key._lighting) { + if (key._light_ramp != nullptr) { + switch (key._light_ramp->get_mode()) { case LightRampAttrib::LRT_single_threshold: { - PN_stdfloat t = light_ramp->get_threshold(0); - PN_stdfloat l0 = light_ramp->get_level(0); + PN_stdfloat t = key._light_ramp->get_threshold(0); + PN_stdfloat l0 = key._light_ramp->get_level(0); text << "\t // Single-threshold light ramp\n"; text << "\t float lr_in = dot(tot_diffuse.rgb, float3(0.33,0.34,0.33));\n"; text << "\t float lr_scale = (lr_in < " << t << ") ? 0.0 : (" << l0 << "/lr_in);\n"; @@ -1139,10 +1160,10 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } case LightRampAttrib::LRT_double_threshold: { - PN_stdfloat t0 = light_ramp->get_threshold(0); - PN_stdfloat t1 = light_ramp->get_threshold(1); - PN_stdfloat l0 = light_ramp->get_level(0); - PN_stdfloat l1 = light_ramp->get_level(1); + PN_stdfloat t0 = key._light_ramp->get_threshold(0); + PN_stdfloat t1 = key._light_ramp->get_threshold(1); + PN_stdfloat l0 = key._light_ramp->get_level(0); + PN_stdfloat l1 = key._light_ramp->get_level(1); text << "\t // Double-threshold light ramp\n"; text << "\t float lr_in = dot(tot_diffuse.rgb, float3(0.33,0.34,0.33));\n"; text << "\t float lr_out = 0.0;\n"; @@ -1156,61 +1177,60 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } } text << "\t // Begin view-space light summation\n"; - if (_have_emission) { - if (_map_index_glow >= 0 && _auto_glow_on) { - text << "\t result = attr_material[2] * saturate(2 * (tex" << _map_index_glow << ".a - 0.5));\n"; + if (key._material_flags & Material::F_emission) { + if (key._texture_flags & ShaderKey::TF_map_glow) { + text << "\t result = attr_material[2] * saturate(2 * (tex" << map_index_glow << ".a - 0.5));\n"; } else { text << "\t result = attr_material[2];\n"; } } else { - if (_map_index_glow >= 0 && _auto_glow_on) { - text << "\t result = saturate(2 * (tex" << _map_index_glow << ".a - 0.5));\n"; + if (key._texture_flags & ShaderKey::TF_map_glow) { + text << "\t result = saturate(2 * (tex" << map_index_glow << ".a - 0.5));\n"; } else { text << "\t result = float4(0,0,0,0);\n"; } } - if ((_have_ambient)&&(_separate_ambient_diffuse)) { - if (_material_flags & Material::F_ambient) { + if (key._have_separate_ambient) { + if (key._material_flags & Material::F_ambient) { text << "\t result += tot_ambient * attr_material[0];\n"; - } else if (_vertex_colors) { + } else if (key._color_type == ColorAttrib::T_vertex) { text << "\t result += tot_ambient * l_color;\n"; - } else if (_flat_colors) { + } else if (key._color_type == ColorAttrib::T_flat) { text << "\t result += tot_ambient * attr_color;\n"; } else { text << "\t result += tot_ambient;\n"; } } - if (_have_diffuse) { - if (_material_flags & Material::F_diffuse) { - text << "\t result += tot_diffuse * attr_material[1];\n"; - } else if (_vertex_colors) { - text << "\t result += tot_diffuse * l_color;\n"; - } else if (_flat_colors) { - text << "\t result += tot_diffuse * attr_color;\n"; - } else { - text << "\t result += tot_diffuse;\n"; - } + if (key._material_flags & Material::F_diffuse) { + text << "\t result += tot_diffuse * attr_material[1];\n"; + } else if (key._color_type == ColorAttrib::T_vertex) { + text << "\t result += tot_diffuse * l_color;\n"; + } else if (key._color_type == ColorAttrib::T_flat) { + text << "\t result += tot_diffuse * attr_color;\n"; + } else { + text << "\t result += tot_diffuse;\n"; } - if (light_ramp->get_mode() == LightRampAttrib::LRT_default) { + if (key._light_ramp == nullptr || + key._light_ramp->get_mode() == LightRampAttrib::LRT_default) { text << "\t result = saturate(result);\n"; } text << "\t // End view-space light calculations\n"; // Combine in alpha, which bypasses lighting calculations. Use of lerp // here is a workaround for a radeon driver bug. - if (_calc_primary_alpha) { - if (_vertex_colors) { + if (key._calc_primary_alpha) { + if (key._color_type == ColorAttrib::T_vertex) { text << "\t result.a = l_color.a;\n"; - } else if (_flat_colors) { + } else if (key._color_type == ColorAttrib::T_flat) { text << "\t result.a = attr_color.a;\n"; } else { text << "\t result.a = 1;\n"; } } } else { - if (_vertex_colors) { + if (key._color_type == ColorAttrib::T_vertex) { text << "\t result = l_color;\n"; - } else if (_flat_colors) { + } else if (key._color_type == ColorAttrib::T_flat) { text << "\t result = attr_color;\n"; } else { text << "\t result = float4(1, 1, 1, 1);\n"; @@ -1221,35 +1241,36 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { // last_saved_result. bool have_saved_result = false; bool have_primary_color = false; - for (int i=0; i<_num_textures; i++) { - TextureStage *stage = texture->get_on_stage(i); - if (stage->get_mode() != TextureStage::M_combine) continue; - if (stage->uses_primary_color() && !have_primary_color) { + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + if (tex._stage == nullptr) { + continue; + } + + if (tex._stage->uses_primary_color() && !have_primary_color) { text << "\t float4 primary_color = result;\n"; have_primary_color = true; } - if (stage->uses_last_saved_result() && !have_saved_result) { + if (tex._stage->uses_last_saved_result() && !have_saved_result) { text << "\t float4 last_saved_result = result;\n"; have_saved_result = true; } } // Now loop through the textures to compose our magic blending formulas. - for (int i = 0; i < _num_textures; ++i) { - TextureStage *stage = texture->get_on_stage(i); - switch (stage->get_mode()) { - case TextureStage::M_modulate: { - bool affects_rgb = texture->on_stage_affects_rgb(i); - bool affects_alpha = texture->on_stage_affects_alpha(i); - - if (affects_rgb && affects_alpha) { + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + switch (tex._mode) { + case TextureStage::M_modulate: + if ((tex._flags & ShaderKey::TF_has_rgb) != 0 && + (tex._flags & ShaderKey::TF_has_alpha) != 0) { text << "\t result.rgba *= tex" << i << ".rgba;\n"; - } else if (affects_alpha) { + } else if (tex._flags & ShaderKey::TF_has_alpha) { text << "\t result.a *= tex" << i << ".a;\n"; - } else if (affects_rgb) { + } else if (tex._flags & ShaderKey::TF_has_rgb) { text << "\t result.rgb *= tex" << i << ".rgb;\n"; } - break; } + break; case TextureStage::M_modulate_glow: case TextureStage::M_modulate_gloss: // in the case of glow or spec we currently see the specularity evenly @@ -1262,38 +1283,37 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { case TextureStage::M_decal: text << "\t result.rgb = lerp(result, tex" << i << ", tex" << i << ".a).rgb;\n"; break; - case TextureStage::M_blend: { - LVecBase4 c = stage->get_color(); - text << "\t result.rgb = lerp(result, tex" << i << " * float4(" - << c[0] << ", " << c[1] << ", " << c[2] << ", " << c[3] << "), tex" << i << ".r).rgb;\n"; - break; } + case TextureStage::M_blend: + text << "\t result.rgb = lerp(result, tex" << i << " * texcolor_" << i << ", tex" << i << ".r).rgb;\n"; + break; case TextureStage::M_replace: text << "\t result = tex" << i << ";\n"; break; case TextureStage::M_add: text << "\t result.rgb += tex" << i << ".rgb;\n"; - if (_calc_primary_alpha) { + if (key._calc_primary_alpha) { text << "\t result.a *= tex" << i << ".a;\n"; } break; case TextureStage::M_combine: + // Only in the case of M_combine have we filled in the _stage pointer. text << "\t result.rgb = "; - if (stage->get_combine_rgb_mode() != TextureStage::CM_undefined) { - text << combine_mode_as_string(stage, stage->get_combine_rgb_mode(), false, i); + if (tex._stage->get_combine_rgb_mode() != TextureStage::CM_undefined) { + text << combine_mode_as_string(tex._stage, tex._stage->get_combine_rgb_mode(), false, i); } else { text << "tex" << i << ".rgb"; } - if (stage->get_rgb_scale() != 1) { - text << " * " << stage->get_rgb_scale(); + if (tex._stage->get_rgb_scale() != 1) { + text << " * " << tex._stage->get_rgb_scale(); } text << ";\n\t result.a = "; - if (stage->get_combine_alpha_mode() != TextureStage::CM_undefined) { - text << combine_mode_as_string(stage, stage->get_combine_alpha_mode(), true, i); + if (tex._stage->get_combine_alpha_mode() != TextureStage::CM_undefined) { + text << combine_mode_as_string(tex._stage, tex._stage->get_combine_alpha_mode(), true, i); } else { text << "tex" << i << ".a"; } - if (stage->get_alpha_scale() != 1) { - text << " * " << stage->get_alpha_scale(); + if (tex._stage->get_alpha_scale() != 1) { + text << " * " << tex._stage->get_alpha_scale(); } text << ";\n"; break; @@ -1303,18 +1323,17 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { default: break; } - if (stage->get_saved_result() && have_saved_result) { + if ((tex._flags & ShaderKey::TF_saved_result) != 0 && have_saved_result) { text << "\t last_saved_result = result;\n"; } } // Apply the color scale. text << "\t result *= attr_colorscale;\n"; - if (_subsume_alpha_test) { - const AlphaTestAttrib *alpha_test = DCAST(AlphaTestAttrib, rs->get_attrib_def(AlphaTestAttrib::get_class_slot())); + if (key._alpha_test_mode != RenderAttrib::M_none) { text << "\t // Shader includes alpha test:\n"; - double ref = alpha_test->get_reference_alpha(); - switch (alpha_test->get_mode()) { + double ref = key._alpha_test_ref; + switch (key._alpha_test_mode) { case RenderAttrib::M_never: text << "\t discard;\n"; break; @@ -1338,40 +1357,36 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { break; case RenderAttrib::M_none: case RenderAttrib::M_always: - default: break; } } - if (_out_primary_glow) { - if (_map_index_glow >= 0 && _auto_glow_on) { - text << "\t result.a = tex" << _map_index_glow << ".a;\n"; + if (key._outputs & AuxBitplaneAttrib::ABO_glow) { + if (key._texture_flags & ShaderKey::TF_map_glow) { + text << "\t result.a = tex" << map_index_glow << ".a;\n"; } else { text << "\t result.a = 0.5;\n"; } } - if (_out_aux_glow) { - if (_map_index_glow >= 0 && _auto_glow_on) { - text << "\t o_aux.a = tex" << _map_index_glow << ".a;\n"; + if (key._outputs & AuxBitplaneAttrib::ABO_aux_glow) { + if (key._texture_flags & ShaderKey::TF_map_glow) { + text << "\t o_aux.a = tex" << map_index_glow << ".a;\n"; } else { text << "\t o_aux.a = 0.5;\n"; } } - if (_lighting) { - if (_have_specular) { - if (_material_flags & Material::F_specular) { - text << "\t tot_specular *= attr_material[3];\n"; - } - if (_map_index_gloss >= 0 && _auto_gloss_on) { - text << "\t tot_specular *= tex" << _map_index_gloss << ".a;\n"; - } - text << "\t result.rgb = result.rgb + tot_specular.rgb;\n"; + if (have_specular) { + if (key._material_flags & Material::F_specular) { + text << "\t tot_specular *= attr_material[3];\n"; } + if (key._texture_flags & ShaderKey::TF_map_gloss) { + text << "\t tot_specular *= tex" << map_index_gloss << ".a;\n"; + } + text << "\t result.rgb = result.rgb + tot_specular.rgb;\n"; } - if (_auto_ramp_on) { - const LightRampAttrib *light_ramp = DCAST(LightRampAttrib, rs->get_attrib_def(LightRampAttrib::get_class_slot())); - switch (light_ramp->get_mode()) { + if (key._light_ramp != nullptr) { + switch (key._light_ramp->get_mode()) { case LightRampAttrib::LRT_hdr0: text << "\t result.rgb = (result*result*result + result*result + result) / (result*result*result + result*result + result + 1);\n"; break; @@ -1386,11 +1401,9 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } // Apply fog. - if (_fog) { - const FogAttrib *fog_attr = DCAST(FogAttrib, rs->get_attrib_def(FogAttrib::get_class_slot())); - Fog *fog = fog_attr->get_fog(); - - switch (fog->get_mode()) { + if (key._fog_mode != 0) { + Fog::Mode fog_mode = (Fog::Mode)(key._fog_mode - 1); + switch (fog_mode) { case Fog::M_linear: text << "\t result.rgb = lerp(attr_fogcolor.rgb, result.rgb, saturate((attr_fog.z - l_hpos.z) * attr_fog.w));\n"; break; @@ -1406,25 +1419,31 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { // The multiply is a workaround for a radeon driver bug. It's annoying as // heck, since it produces an extra instruction. text << "\t o_color = result * 1.000001;\n"; - if (_subsume_alpha_test) { + if (key._alpha_test_mode != RenderAttrib::M_none) { text << "\t // Shader subsumes normal alpha test.\n"; } - if (_disable_alpha_write) { + if (key._disable_alpha_write) { text << "\t // Shader disables alpha write.\n"; } text << "}\n"; // Insert the shader into the shader attrib. - CPT(RenderAttrib) shattr = create_shader_attrib(text.str()); - if (_subsume_alpha_test) { + PT(Shader) shader = Shader::make(text.str(), Shader::SL_Cg); + nassertr(shader != nullptr, nullptr); + + CPT(RenderAttrib) shattr = ShaderAttrib::make(shader); + if (key._alpha_test_mode != RenderAttrib::M_none) { shattr = DCAST(ShaderAttrib, shattr)->set_flag(ShaderAttrib::F_subsume_alpha_test, true); } - if (_disable_alpha_write) { + if (key._disable_alpha_write) { shattr = DCAST(ShaderAttrib, shattr)->set_flag(ShaderAttrib::F_disable_alpha_write, true); } - clear_analysis(); + reset_register_allocator(); - return DCAST(ShaderAttrib, shattr); + + CPT(ShaderAttrib) attr = DCAST(ShaderAttrib, shattr); + _generated_shaders[key] = attr; + return attr; } /** @@ -1592,4 +1611,165 @@ texture_type_as_string(Texture::TextureType ttype) { } } +/** + * Initializes the ShaderKey to the empty state. + */ +ShaderGenerator::ShaderKey:: +ShaderKey() : + _color_type(ColorAttrib::T_vertex), + _material_flags(0), + _texture_flags(0), + _lighting(false), + _have_separate_ambient(false), + _fog_mode(0), + _outputs(0), + _calc_primary_alpha(false), + _disable_alpha_write(false), + _alpha_test_mode(RenderAttrib::M_none), + _alpha_test_ref(0.0), + _num_clip_planes(0), + _light_ramp(nullptr) { +} + +/** + * Returns true if this ShaderKey sorts less than the other one. This is an + * arbitrary, but consistent ordering. + */ +bool ShaderGenerator::ShaderKey:: +operator < (const ShaderKey &other) const { + if (_anim_spec != other._anim_spec) { + return _anim_spec < other._anim_spec; + } + if (_color_type != other._color_type) { + return _color_type < other._color_type; + } + if (_material_flags != other._material_flags) { + return _material_flags < other._material_flags; + } + if (_texture_flags != other._texture_flags) { + return _texture_flags < other._texture_flags; + } + if (_textures.size() != other._textures.size()) { + return _textures.size() < other._textures.size(); + } + for (size_t i = 0; i < _textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = _textures[i]; + const ShaderKey::TextureInfo &other_tex = other._textures[i]; + if (tex._texcoord_name != other_tex._texcoord_name) { + return tex._texcoord_name < other_tex._texcoord_name; + } + if (tex._type != other_tex._type) { + return tex._type < other_tex._type; + } + if (tex._mode != other_tex._mode) { + return tex._mode < other_tex._mode; + } + if (tex._gen_mode != other_tex._gen_mode) { + return tex._gen_mode < other_tex._gen_mode; + } + if (tex._flags != other_tex._flags) { + return tex._flags < other_tex._flags; + } + if (tex._stage != other_tex._stage) { + return tex._stage < other_tex._stage; + } + } + if (_lights.size() != other._lights.size()) { + return _lights.size() < other._lights.size(); + } + for (size_t i = 0; i < _lights.size(); ++i) { + const ShaderKey::LightInfo &light = _lights[i]; + const ShaderKey::LightInfo &other_light = other._lights[i]; + if (light._type != other_light._type) { + return light._type < other_light._type; + } + if (light._flags != other_light._flags) { + return light._flags < other_light._flags; + } + } + if (_lighting != other._lighting) { + return _lighting < other._lighting; + } + if (_have_separate_ambient != other._have_separate_ambient) { + return _have_separate_ambient < other._have_separate_ambient; + } + if (_fog_mode != other._fog_mode) { + return _fog_mode < other._fog_mode; + } + if (_outputs != other._outputs) { + return _outputs < other._outputs; + } + if (_calc_primary_alpha != other._calc_primary_alpha) { + return _calc_primary_alpha < other._calc_primary_alpha; + } + if (_disable_alpha_write != other._disable_alpha_write) { + return _disable_alpha_write < other._disable_alpha_write; + } + if (_alpha_test_mode != other._alpha_test_mode) { + return _alpha_test_mode < other._alpha_test_mode; + } + if (_alpha_test_ref != other._alpha_test_ref) { + return _alpha_test_ref < other._alpha_test_ref; + } + if (_num_clip_planes != other._num_clip_planes) { + return _num_clip_planes < other._num_clip_planes; + } + return _light_ramp < other._light_ramp; +} + +/** + * Returns true if this ShaderKey is equal to the other one. + */ +bool ShaderGenerator::ShaderKey:: +operator == (const ShaderKey &other) const { + if (_anim_spec != other._anim_spec) { + return false; + } + if (_color_type != other._color_type) { + return false; + } + if (_material_flags != other._material_flags) { + return false; + } + if (_texture_flags != other._texture_flags) { + return false; + } + if (_textures.size() != other._textures.size()) { + return false; + } + for (size_t i = 0; i < _textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = _textures[i]; + const ShaderKey::TextureInfo &other_tex = other._textures[i]; + if (tex._texcoord_name != other_tex._texcoord_name || + tex._type != other_tex._type || + tex._mode != other_tex._mode || + tex._gen_mode != other_tex._gen_mode || + tex._flags != other_tex._flags || + tex._stage != other_tex._stage) { + return false; + } + } + if (_lights.size() != other._lights.size()) { + return false; + } + for (size_t i = 0; i < _lights.size(); ++i) { + const ShaderKey::LightInfo &light = _lights[i]; + const ShaderKey::LightInfo &other_light = other._lights[i]; + if (light._type != other_light._type || + light._flags != other_light._flags) { + return false; + } + } + return _lighting == other._lighting + && _have_separate_ambient == other._have_separate_ambient + && _fog_mode == other._fog_mode + && _outputs == other._outputs + && _calc_primary_alpha == other._calc_primary_alpha + && _disable_alpha_write == other._disable_alpha_write + && _alpha_test_mode == other._alpha_test_mode + && _alpha_test_ref == other._alpha_test_ref + && _num_clip_planes == other._num_clip_planes + && _light_ramp == other._light_ramp; +} + #endif // HAVE_CG diff --git a/panda/src/pgraphnodes/shaderGenerator.h b/panda/src/pgraphnodes/shaderGenerator.h index 9042291631..ba2619bef7 100644 --- a/panda/src/pgraphnodes/shaderGenerator.h +++ b/panda/src/pgraphnodes/shaderGenerator.h @@ -28,6 +28,11 @@ #include "renderState.h" #include "renderAttrib.h" +#include "colorAttrib.h" +#include "lightRampAttrib.h" +#include "texGenAttrib.h" +#include "textureAttrib.h" + class AmbientLight; class DirectionalLight; class PointLight; @@ -66,7 +71,6 @@ PUBLISHED: const GeomVertexAnimationSpec &anim); protected: - CPT(RenderAttrib) create_shader_attrib(const string &txt); static const string combine_mode_as_string(CPT(TextureStage) stage, TextureStage::CombineMode c_mode, bool alpha, short texindex); static const string combine_source_as_string(CPT(TextureStage) stage, @@ -84,66 +88,76 @@ protected: const char *alloc_vreg(); const char *alloc_freg(); + bool _use_shadow_filter; + // RenderState analysis information. Created by analyze_renderstate: CPT(RenderState) _state; - int _material_flags; - int _num_textures; + struct ShaderKey { + ShaderKey(); + bool operator < (const ShaderKey &other) const; + bool operator == (const ShaderKey &other) const; + bool operator != (const ShaderKey &other) const { return !operator ==(other); } - pvector _lights; - pvector _lights_np; + GeomVertexAnimationSpec _anim_spec; + enum TextureFlags { + TF_has_rgb = 1, + TF_has_alpha = 2, + TF_has_texscale = 4, + TF_has_texmat = 8, + TF_saved_result = 16, + TF_map_normal = 32, + TF_map_height = 64, + TF_map_glow = 128, + TF_map_gloss = 256, + }; - bool _vertex_colors; - bool _flat_colors; + ColorAttrib::Type _color_type; + int _material_flags; + int _texture_flags; - bool _lighting; - bool _shadows; - bool _fog; + struct TextureInfo { + CPT_InternalName _texcoord_name; + Texture::TextureType _type; + TextureStage::Mode _mode; + TexGenAttrib::Mode _gen_mode; + int _flags; - bool _have_ambient; - bool _have_diffuse; - bool _have_emission; - bool _have_specular; + // Stored only if combine modes / blend color is used + CPT(TextureStage) _stage; + }; + pvector _textures; - bool _separate_ambient_diffuse; + enum LightFlags { + LF_has_shadows = 1, + LF_has_specular_color = 2, + }; - int _map_index_normal; - int _map_index_height; - int _map_index_glow; - int _map_index_gloss; - bool _map_height_in_alpha; + struct LightInfo { + TypeHandle _type; + int _flags; + }; + pvector _lights; + bool _lighting; + bool _have_separate_ambient; - bool _out_primary_glow; - bool _out_aux_normal; - bool _out_aux_glow; - bool _out_aux_any; + int _fog_mode; - bool _have_alpha_test; - bool _have_alpha_blend; - bool _calc_primary_alpha; - bool _subsume_alpha_test; - bool _disable_alpha_write; + int _outputs; + bool _calc_primary_alpha; + bool _disable_alpha_write; + RenderAttrib::PandaCompareFunc _alpha_test_mode; + PN_stdfloat _alpha_test_ref; - int _num_clip_planes; - bool _use_shadow_filter; + int _num_clip_planes; - bool _need_material_props; - bool _need_world_position; - bool _need_world_normal; - bool _need_eye_position; - bool _need_eye_normal; - bool _normalize_normals; - bool _auto_normal_on; - bool _auto_glow_on; - bool _auto_gloss_on; - bool _auto_ramp_on; - bool _auto_shadow_on; + CPT(LightRampAttrib) _light_ramp; + }; - void analyze_renderstate(const RenderState *rs); - void clear_analysis(); + typedef phash_map GeneratedShaders; + GeneratedShaders _generated_shaders; - // This is not a PT() to prevent a circular reference. - GraphicsStateGuardianBase *_gsg; + void analyze_renderstate(ShaderKey &key, const RenderState *rs); public: static TypeHandle get_class_type() { diff --git a/panda/src/pgraphnodes/spotlight.cxx b/panda/src/pgraphnodes/spotlight.cxx index badf4544d9..99432a904b 100644 --- a/panda/src/pgraphnodes/spotlight.cxx +++ b/panda/src/pgraphnodes/spotlight.cxx @@ -65,9 +65,7 @@ fillin(DatagramIterator &scan, BamReader *manager) { */ Spotlight:: Spotlight(const string &name) : - LightLensNode(name), - _has_specular_color(false) -{ + LightLensNode(name) { _lenses[0]._lens->set_interocular_distance(0); } @@ -78,7 +76,6 @@ Spotlight(const string &name) : Spotlight:: Spotlight(const Spotlight ©) : LightLensNode(copy), - _has_specular_color(copy._has_specular_color), _cycler(copy._cycler) { } diff --git a/panda/src/pgraphnodes/spotlight.h b/panda/src/pgraphnodes/spotlight.h index 6cc175fe61..c9a6962b07 100644 --- a/panda/src/pgraphnodes/spotlight.h +++ b/panda/src/pgraphnodes/spotlight.h @@ -79,8 +79,6 @@ private: CPT(RenderState) get_viz_state(); private: - bool _has_specular_color; - // This is the data that must be cycled between pipeline stages. class EXPCL_PANDA_PGRAPHNODES CData : public CycleData { public: diff --git a/panda/src/pstatclient/pStatProperties.cxx b/panda/src/pstatclient/pStatProperties.cxx index 7b14891daa..25d2bfd591 100644 --- a/panda/src/pstatclient/pStatProperties.cxx +++ b/panda/src/pstatclient/pStatProperties.cxx @@ -119,7 +119,7 @@ static TimeCollectorProperties time_properties[] = { { 1, "Cull:Sort", { 0.3, 0.3, 0.6 } }, { 1, "*", { 0.1, 0.1, 0.5 } }, { 1, "*:Show fps", { 0.5, 0.8, 1.0 } }, - { 0, "*:Munge", { 0.3, 0.3, 0.9 } }, + { 1, "*:Munge", { 0.3, 0.3, 0.9 } }, { 1, "*:Munge:Geom", { 0.4, 0.2, 0.8 } }, { 1, "*:Munge:Sprites", { 0.2, 0.8, 0.4 } }, { 0, "*:Munge:Data", { 0.7, 0.5, 0.2 } }, From 65ae1e16bcc16b292564b8974ebb6f5d5c546ee0 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 15 Jul 2017 20:17:29 +0200 Subject: [PATCH 21/36] ShaderGenerator: support multiple normal maps Uses Reoriented Normal Mapping to blend additional normal maps. Fixes #156 --- panda/src/pgraphnodes/shaderGenerator.cxx | 38 ++++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 62206f1d69..b58ce1e777 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -472,7 +472,7 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) { * - flat colors * - vertex colors * - lighting - * - normal maps, but not multiple + * - normal maps, even multiple * - gloss maps, but not multiple * - glow maps, but not multiple * - materials, but not updates to materials @@ -569,7 +569,6 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { rs->write(text, 2); text << "*/\n"; - int map_index_normal = -1; int map_index_glow = -1; int map_index_gloss = -1; @@ -620,7 +619,8 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } } - if (tex._flags & (ShaderKey::TF_map_normal | ShaderKey::TF_map_height)) { + if (tangent_input.empty() && + (tex._flags & (ShaderKey::TF_map_normal | ShaderKey::TF_map_height)) != 0) { PT(InternalName) tangent_name = InternalName::get_tangent(); PT(InternalName) binormal_name = InternalName::get_binormal(); @@ -629,19 +629,12 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { tangent_name = tangent_name->append(tex._texcoord_name->get_basename()); binormal_name = binormal_name->append(tex._texcoord_name->get_basename()); } + tangent_input = tangent_name->join("_"); binormal_input = binormal_name->join("_"); text << "\t in float4 vtx_" << tangent_input << " : " << alloc_vreg() << ",\n"; text << "\t in float4 vtx_" << binormal_input << " : " << alloc_vreg() << ",\n"; - - if (tex._flags & ShaderKey::TF_map_normal) { - map_index_normal = i; - tangent_freg = alloc_freg(); - binormal_freg = alloc_freg(); - text << "\t out float4 l_tangent : " << tangent_freg << ",\n"; - text << "\t out float4 l_binormal : " << binormal_freg << ",\n"; - } } if (tex._flags & ShaderKey::TF_map_glow) { @@ -651,6 +644,12 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { map_index_gloss = i; } } + if (key._texture_flags & ShaderKey::TF_map_normal) { + tangent_freg = alloc_freg(); + binormal_freg = alloc_freg(); + text << "\t out float4 l_tangent : " << tangent_freg << ",\n"; + text << "\t out float4 l_binormal : " << binormal_freg << ",\n"; + } if (key._color_type == ColorAttrib::T_vertex) { text << "\t in float4 vtx_color : " << color_vreg << ",\n"; text << "\t out float4 l_color : COLOR0,\n"; @@ -1000,7 +999,22 @@ synthesize_shader(const RenderState *rs, const GeomVertexAnimationSpec &anim) { } if (key._texture_flags & ShaderKey::TF_map_normal) { text << "\t // Translate tangent-space normal in map to view-space.\n"; - text << "\t float3 tsnormal = ((float3)tex" << map_index_normal << " * 2) - 1;\n"; + + // Use Reoriented Normal Mapping to blend additional normal maps. + bool is_first = true; + for (size_t i = 0; i < key._textures.size(); ++i) { + const ShaderKey::TextureInfo &tex = key._textures[i]; + if (tex._flags & ShaderKey::TF_map_normal) { + if (is_first) { + text << "\t float3 tsnormal = (tex" << i << ".xyz * 2) - 1;\n"; + is_first = false; + continue; + } + text << "\t tsnormal.z += 1;\n"; + text << "\t float3 tmp" << i << " = tex" << i << ".xyz * float3(-2, -2, 2) + float3(1, 1, -1);\n"; + text << "\t tsnormal = normalize(tsnormal * dot(tsnormal, tmp" << i << ") - tmp" << i << " * tsnormal.z);\n"; + } + } text << "\t l_eye_normal.xyz *= tsnormal.z;\n"; text << "\t l_eye_normal.xyz += l_tangent * tsnormal.x;\n"; text << "\t l_eye_normal.xyz += l_binormal * tsnormal.y;\n"; From d1c34c33601cefdee50d323964cd11901149dc5d Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Aug 2017 21:29:10 +0200 Subject: [PATCH 22/36] interrogate: support static properties --- dtool/src/cppparser/cppBison.cxx.prebuilt | 4474 +++++++++-------- dtool/src/cppparser/cppBison.yxx | 4 + dtool/src/dtoolutil/executionEnvironment.h | 5 + dtool/src/dtoolutil/pandaSystem.h | 15 + dtool/src/dtoolutil/textEncoder.h | 1 + dtool/src/interrogate/interfaceMaker.cxx | 3 +- dtool/src/interrogate/interfaceMaker.h | 1 + .../interfaceMakerPythonNative.cxx | 168 +- dtool/src/interrogatedb/py_panda.cxx | 139 +- dtool/src/interrogatedb/py_panda.h | 3 + dtool/src/pystub/pystub.cxx | 4 + panda/src/audio/audioManager.h | 1 + panda/src/collide/collisionNode.h | 1 + panda/src/display/windowProperties.h | 2 + panda/src/express/memoryUsage.h | 13 + panda/src/express/multifile.h | 1 + panda/src/gobj/textureStage.h | 2 + panda/src/gobj/textureStagePool.h | 1 + panda/src/gobj/vertexDataPage.h | 1 + panda/src/parametrics/ropeNode.h | 17 + panda/src/pgraph/alphaTestAttrib.h | 1 + panda/src/pgraph/antialiasAttrib.h | 1 + panda/src/pgraph/audioVolumeAttrib.h | 1 + panda/src/pgraph/auxBitplaneAttrib.h | 1 + panda/src/pgraph/clipPlaneAttrib.h | 1 + panda/src/pgraph/colorAttrib.h | 1 + panda/src/pgraph/colorBlendAttrib.h | 1 + panda/src/pgraph/colorScaleAttrib.h | 1 + panda/src/pgraph/colorWriteAttrib.h | 1 + panda/src/pgraph/cullBinAttrib.h | 1 + panda/src/pgraph/cullFaceAttrib.h | 1 + panda/src/pgraph/depthOffsetAttrib.h | 1 + panda/src/pgraph/depthTestAttrib.h | 1 + panda/src/pgraph/depthWriteAttrib.h | 1 + panda/src/pgraph/fogAttrib.h | 1 + panda/src/pgraph/geomNode.h | 1 + panda/src/pgraph/lightAttrib.h | 1 + panda/src/pgraph/lightRampAttrib.h | 1 + panda/src/pgraph/logicOpAttrib.h | 1 + panda/src/pgraph/materialAttrib.h | 1 + panda/src/pgraph/pandaNode.h | 2 + panda/src/pgraph/renderAttrib.h | 1 + panda/src/pgraph/renderModeAttrib.h | 1 + panda/src/pgraph/rescaleNormalAttrib.h | 1 + panda/src/pgraph/scissorAttrib.h | 1 + panda/src/pgraph/shadeModelAttrib.h | 1 + panda/src/pgraph/shaderAttrib.h | 1 + panda/src/pgraph/stencilAttrib.h | 1 + panda/src/pgraph/texGenAttrib.h | 1 + panda/src/pgraph/texMatrixAttrib.h | 1 + panda/src/pgraph/textureAttrib.h | 1 + panda/src/pgraph/transparencyAttrib.h | 1 + panda/src/pgui/pgButton.h | 1 + panda/src/pipeline/thread.h | 10 + panda/src/speedtree/speedTreeNode.h | 3 + panda/src/vision/webcamVideo.h | 1 + 56 files changed, 2631 insertions(+), 2273 deletions(-) diff --git a/dtool/src/cppparser/cppBison.cxx.prebuilt b/dtool/src/cppparser/cppBison.cxx.prebuilt index 692194fa8a..a0d5622887 100644 --- a/dtool/src/cppparser/cppBison.cxx.prebuilt +++ b/dtool/src/cppparser/cppBison.cxx.prebuilt @@ -857,16 +857,16 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 104 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 6950 +#define YYLAST 7000 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 170 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 109 /* YYNRULES -- Number of rules. */ -#define YYNRULES 756 +#define YYNRULES 757 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 1538 +#define YYNSTATES 1539 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned by yylex, with out-of-bounds checking. */ @@ -1001,8 +1001,8 @@ static const yytype_uint16 yyrline[] = 3833, 3837, 3841, 3845, 3849, 3856, 3860, 3864, 3868, 3872, 3876, 3880, 3884, 3888, 3894, 3900, 3908, 3912, 3916, 3920, 3927, 3937, 3943, 3949, 3959, 3971, 3979, 3983, 4013, 4017, - 4021, 4025, 4029, 4033, 4039, 4043, 4047, 4051, 4062, 4066, - 4070, 4074, 4082, 4086, 4090, 4096, 4107 + 4021, 4025, 4029, 4033, 4039, 4043, 4047, 4051, 4055, 4066, + 4070, 4074, 4078, 4086, 4090, 4094, 4100, 4111 }; #endif @@ -1106,12 +1106,12 @@ static const yytype_uint16 yytoknum[] = }; # endif -#define YYPACT_NINF -913 +#define YYPACT_NINF -918 #define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-913))) + (!!((Yystate) == (-918))) -#define YYTABLE_NINF -752 +#define YYTABLE_NINF -753 #define yytable_value_is_error(Yytable_value) \ 0 @@ -1120,160 +1120,160 @@ static const yytype_uint16 yytoknum[] = STATE-NUM. */ static const yytype_int16 yypact[] = { - 152, -913, 3620, 5734, 47, 4886, -913, -913, -913, -913, - -913, -913, -913, -913, 85, -45, -38, 3, 36, 41, - -72, 45, 71, -913, -913, 58, 99, 122, 125, 127, - 134, 144, 169, 178, 187, 189, 195, 200, 204, 207, - 214, 218, 221, 223, 5219, -913, -913, 93, 225, 240, - 30, 244, -913, 243, 253, 255, 3620, 3620, 3620, 3620, - 3620, 1760, 474, 3620, 4671, -913, 150, -913, -913, -913, - -913, -913, -913, -913, -913, 5844, 262, -913, 27, -913, - -913, 4115, 4506, 4506, -913, 3087, 266, -913, 4506, -913, - -913, 403, 403, -913, -913, -913, -913, 123, 105, -913, - -913, -913, -913, -913, -913, 4249, 268, -913, 6810, 6810, - 6810, -913, 6810, 5208, 6810, -40, -913, 6801, 310, 316, - 323, 327, 6810, 1955, 347, 349, 350, 6810, 6810, 336, - 6637, 6810, 6810, 1562, 6810, 6810, -913, -913, -913, -913, - 4254, -913, -913, -913, -913, -913, 3620, 3620, 5734, 3620, - 3620, 3620, 3620, 5734, 3620, 5734, 3620, 5734, 3620, 5734, - 5734, 5734, 5734, 5734, 5734, 5734, 5734, 5734, 5734, 5734, - 5734, 5734, 5734, 5734, 3620, -913, -913, 337, 3087, 339, - 341, 3087, -913, -913, 5734, 3620, 3620, 342, 5330, 5734, - 1760, 3620, 3620, 80, 80, 80, 80, 80, 85, -38, - 3, 36, 41, 45, 58, 122, 6587, 5383, 5831, 5990, - 255, 163, -81, 4671, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, 3087, 3087, -92, 363, -913, - -913, 80, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, - 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, - 3620, 3620, 3620, 2682, 3620, -913, -913, 403, 403, 2816, - -913, -913, -913, 4506, -913, -913, -913, -913, 5734, -913, - 355, 1016, 343, 403, 403, 343, 343, 4999, 351, -913, - 353, -913, -913, -913, -913, -913, -913, 1292, 359, 5187, - -913, 3087, 467, 372, 364, 2409, 5245, 6810, -913, -913, - -913, -913, 6810, -913, -913, -913, -913, 6729, 2685, -913, - 3087, 3087, 3087, 3087, -913, -913, 376, -913, -913, -913, - -913, -913, 3620, -913, 4347, -913, 368, -913, 4433, -913, - 3087, 135, -913, -913, -10, 366, -913, 369, 5930, 3087, - 370, -913, 3087, -913, 180, 379, -913, -913, -913, -913, - 1828, -913, -913, 375, 388, -913, 378, 380, 381, 382, - 386, 387, 402, 394, 405, 398, 399, 400, 407, 421, - 408, -73, 422, 410, 411, 412, 413, 418, 419, 424, - 425, 429, 433, 435, 3620, -913, 5734, 3620, -913, 5730, - 415, 436, 440, 3087, 441, 444, 455, 456, 4118, 457, - 459, 3620, 3620, -913, 530, -913, 1232, 465, 3620, -913, - -913, 1430, 1843, 960, 960, 878, 878, 277, 277, -913, - 2972, 4083, 4884, 2005, 878, 878, 142, 142, 80, 80, - 80, -913, -913, -59, 1639, -913, -913, 466, 4502, 468, - 343, 470, 462, 3087, 343, 343, 343, 343, 343, 471, - -913, 351, -913, 351, -913, 471, 471, -913, 343, 4249, - 5820, 5705, 343, 343, 472, 18, -913, 1096, 416, -913, - 3620, 3087, 477, -913, -913, -913, -913, 1292, -46, -44, - -28, 4249, 473, -12, -913, -913, -913, 496, 6810, 4249, - 3754, 85, 480, 4559, -913, -913, -913, 503, 504, 505, - 506, 509, 6122, -913, 3773, 5479, 188, 486, 180, -913, - -913, 511, -913, 5734, -913, 15, 2950, 6045, 662, -913, - 5734, -913, 493, 175, -913, -913, 2548, -913, -913, 1043, - -913, 512, 5187, -913, -913, -913, -913, -913, -913, -913, - 507, -913, 513, -913, -913, -913, -913, 5734, -913, 5734, - -913, 5734, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, 4580, 494, 501, -913, 514, -913, -913, - 516, -913, -913, 519, -913, -913, -913, -913, 80, 4671, - -913, 3087, 363, 5585, 4402, -913, 4671, 3620, -913, -913, - -913, -913, -913, 471, 343, -913, 471, 471, 471, 471, - 471, 3620, 174, 621, 5844, 1096, 416, -913, 210, 226, - -913, -913, 5614, 525, 1096, 1096, 1096, 1096, 1096, 1096, - -68, -913, -913, 526, 3087, 416, 416, 416, 416, 416, - 416, -66, 518, 4671, -913, 19, -913, 543, 642, 2409, - -913, 615, 4249, -913, -913, -913, -913, -913, -913, -913, - -913, 533, 546, 548, -913, -913, 5219, -913, -913, 549, - 34, 551, -913, 534, 3620, 3620, 3620, 3620, 1760, 3620, - 542, 29, -913, -913, 4767, -913, 150, -913, 6810, 6810, - 6194, -913, 702, 714, 715, 717, -913, -913, 162, 580, - -913, -913, -913, -913, 5547, -913, 573, 587, 2953, -913, - 1270, -913, -913, 15, -913, 1043, -913, 589, 5585, 579, - 1043, 5585, 574, 4598, 662, 583, 662, 662, 662, 662, - 662, -34, -913, -913, 577, 6266, -913, -913, -913, 3087, - 357, -913, 572, -913, 596, 597, 3084, 3240, 591, 1043, - 1043, 4187, 1043, 1043, 1043, 1043, -913, 54, 233, -913, - 1292, -913, 3620, 3620, 582, 598, 599, -913, -913, -913, - 3620, -913, 3620, -913, 603, -913, 5959, 4249, -913, -913, - -913, -913, -913, -913, 593, -913, -913, 609, -913, 4671, - 471, 601, 607, 5705, 1096, 416, -68, -66, 612, 613, - 4402, -913, -913, 1096, 608, 608, 608, 608, 608, 288, - 3620, -913, 416, -913, 614, 614, 614, 614, 614, 299, - 3620, -913, 617, -913, 3620, -913, 618, 4616, 6338, -913, - 629, -913, -913, 5734, 5734, 5734, 623, 5734, 624, 5359, - 5734, 1760, 80, 80, 80, 80, 625, -58, 80, -913, - -913, 3894, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, - 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, 3620, - 3620, 3620, 3620, 3218, 3620, -913, -913, -913, -913, -55, - 646, 649, 651, 6410, 35, -913, 1270, 6689, 5479, 3087, - 650, 647, 1270, 1270, 1270, 1270, 1270, 1270, -30, 614, - -913, 233, -913, 635, 1043, 236, 639, -913, -913, 303, - 662, 643, 643, 643, 643, 643, -913, 3620, -913, -913, - 5585, 640, 331, -913, 116, 663, 664, -913, 2242, -913, - -913, -913, 3084, 648, 667, 4671, -913, -913, 1043, 329, - 329, 807, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, 673, 675, - -913, -913, 329, 329, 329, 286, 838, -913, 3620, -913, - 2548, 704, -913, 543, -41, -37, -913, -913, -913, -33, - -25, -913, 5219, 403, 802, 84, -913, -913, 5585, -913, - -68, -66, -913, -913, 5585, 5585, -913, 608, 688, 690, - 614, 696, 692, 3508, -913, -913, -913, 3955, 718, 716, - -913, 700, 712, 713, 3620, 720, 3087, 705, 706, 721, - 707, 4653, 3620, -913, -913, -913, 1430, 1843, 960, 960, - 878, 878, 277, 277, -913, 3828, 4083, 4884, 2005, 878, - 878, 142, 142, 80, 80, 80, -913, -913, -24, 1890, - 6482, 860, 730, 870, 881, 882, -913, 746, -30, 614, - -913, -913, -913, -913, -913, -913, 5734, 1270, 4033, -913, - -913, 748, -913, -913, 294, 732, -913, -913, 643, 5585, - 729, 736, -913, -913, 3087, 3620, 3620, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, -913, - -913, -913, -913, -913, -913, -913, -913, -913, -913, 737, - -913, 3352, 329, -913, -913, -913, -913, -913, 3754, 739, - 3240, 1043, -913, -913, -913, -913, 4402, 403, -913, -913, - -913, 20, 743, 749, -913, -913, 750, 751, 5585, -913, - 5585, -913, -913, 5069, 5804, 6029, 3087, 358, -913, -913, - 888, -913, 3955, -913, 754, 755, 756, 759, 758, -913, - -913, 762, -913, -913, 80, 3620, -913, -913, -913, -23, - -913, -3, 761, 66, -913, -913, -913, 765, 757, 775, - 776, 43, 777, 4033, 4033, 4033, 4033, 4033, 1760, 4033, - 4821, -913, 1043, 734, 770, -913, 734, 5585, 797, -913, - -913, 798, -913, 800, 803, 2075, -913, 3084, 4671, 805, - -913, -913, 818, -913, 806, -913, -913, -913, -913, -913, - 809, 810, 4428, -913, 4428, -913, 4428, -913, -913, 4428, - 4428, 4428, -913, 6554, -913, 3620, 3620, -913, 3620, -913, - 3620, 4671, 958, 825, 975, 843, 848, 976, 853, 5734, - 5734, 5734, 5734, 830, 5450, 5734, 114, 114, 114, 114, - 114, 836, 67, 114, 4033, 4033, 4033, 4033, 4033, 4033, - 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, 4033, - 4033, 4033, 4033, 3486, 3620, -913, -913, 5585, 842, -913, - 734, -913, -913, 997, -913, 847, -913, -913, -913, 4402, - 4402, 4402, -913, -913, -913, -913, -913, -913, -913, -913, - -913, 69, 76, 89, 100, 854, -913, 866, -913, -913, - 104, -913, 855, 868, 873, 874, 3087, 856, 865, 876, - 4033, -913, 2700, 5052, 1489, 1489, 1366, 1366, 1320, 1320, - -913, 4269, 5068, 5084, 1341, 846, 846, 114, 114, 114, - -913, -913, 143, 2428, 5585, 867, -913, 734, -913, -913, - 734, 877, -913, -913, -913, 734, 734, -913, -913, -913, - -913, 886, 1030, 1035, 898, -913, 884, 885, 893, 892, - -913, -913, 897, 114, 4033, -913, -913, 899, -913, 734, - -913, -913, 904, 905, -913, 3620, 3620, 3620, -913, 3620, - 4821, -913, 4402, 902, 915, 147, 153, 165, 171, 4402, - -913, -913, -913, -913, -913, -913, -913, -913 + 328, -918, 3448, 5658, 36, 4726, -918, -918, -918, -918, + -918, -918, -918, -918, -50, -112, -100, -83, -71, -51, + -98, -22, -52, -918, -918, 11, 56, 78, 95, 116, + 121, 154, 162, 167, 174, 178, 185, 195, 198, 207, + 215, 231, 259, 267, 5969, -918, -918, 13, 269, 285, + 10, 296, -918, 290, 292, 295, 3448, 3448, 3448, 3448, + 3448, 1577, 1319, 3448, 4528, -918, 81, -918, -918, -918, + -918, -918, -918, -918, -918, 5768, 321, -918, -30, -918, + -918, 3803, 4177, 4177, -918, 5453, 325, -918, 4177, -918, + -918, 87, 87, -918, -918, -918, -918, 163, 111, -918, + -918, -918, -918, -918, -918, 6089, 342, -918, 6860, 6860, + 6860, -918, 6860, 5109, 6860, -101, -918, 6851, 347, 348, + 350, 351, 6860, 1165, 237, 368, 373, 6860, 6860, 360, + 6687, 6860, 6860, 5777, 6860, 6860, -918, -918, -918, -918, + 3942, -918, -918, -918, -918, -918, 3448, 3448, 5658, 3448, + 3448, 3448, 3448, 5658, 3448, 5658, 3448, 5658, 3448, 5658, + 5658, 5658, 5658, 5658, 5658, 5658, 5658, 5658, 5658, 5658, + 5658, 5658, 5658, 5658, 3448, -918, -918, 364, 5453, 366, + 370, 5453, -918, -918, 5658, 3448, 3448, 372, 5197, 5658, + 1577, 3448, 3448, 50, 50, 50, 50, 50, -50, -100, + -83, -71, -51, -22, 11, 78, 4083, 5386, 5645, 6631, + 295, 371, -110, 4528, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, 5453, 5453, -116, 390, + -918, -918, 50, 3448, 3448, 3448, 3448, 3448, 3448, 3448, + 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, + 3448, 3448, 3448, 3448, 2510, 3448, -918, -918, 87, 87, + 2644, -918, -918, -918, 4177, -918, -918, -918, -918, 5658, + -918, 384, 1154, 401, 87, 87, 401, 401, 4839, 377, + -918, 385, -918, -918, -918, -918, -918, -918, 867, 404, + 4526, -918, 5453, 510, 419, 403, 2237, 5112, 6860, -918, + -918, -918, -918, 6860, -918, -918, -918, -918, 6779, 1693, + -918, 5453, 5453, 5453, 5453, -918, -918, 435, -918, -918, + -918, -918, -918, 3448, -918, 4035, -918, 424, -918, 4121, + -918, 5453, 4, -918, -918, 439, 422, -918, 426, 5854, + 5453, 427, -918, 5453, -918, -9, 440, -918, -918, -918, + -918, 2568, -918, -918, 428, 446, -918, 434, 436, 438, + 441, 442, 447, 468, 459, 470, 462, 463, 464, 466, + 486, 471, -72, 487, 472, 473, 477, 478, 479, 480, + 481, 483, 484, 488, 489, 3448, -918, 5658, 3448, -918, + 6665, 497, 491, 492, 5453, 493, 494, 506, 498, 4247, + 499, 500, 3448, 3448, -918, 621, -918, 2434, 503, 3448, + -918, -918, 3772, 4892, 1052, 1052, 1444, 1444, 1031, 1031, + -918, 2800, 4908, 4924, 4964, 1444, 1444, 75, 75, 50, + 50, 50, -918, -918, -67, 2256, -918, -918, 502, 4268, + 504, 401, 509, 520, 5453, 401, 401, 401, 401, 401, + 515, -918, 377, -918, 377, -918, 515, 515, -918, 401, + 6089, 5744, 5627, 401, 401, 523, 20, -918, 392, 532, + -918, 3448, 5453, 496, -918, -918, -918, -918, 867, -13, + 153, 161, 6089, 526, 232, -918, -918, -918, 546, 6860, + 6089, 1717, -50, 531, 4286, -918, -918, -918, 535, 551, + 552, 555, 557, 6163, -918, 4190, 5400, 383, 542, -9, + -918, -918, 561, -918, 5658, -918, 17, 2778, 5993, 1081, + -918, 5658, -918, 548, 278, -918, -918, 2376, -918, -918, + 310, -918, 564, 4526, -918, -918, -918, -918, -918, -918, + -918, 558, -918, 560, -918, -918, -918, -918, 5658, -918, + 5658, -918, 5658, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, 4305, 544, 549, -918, 562, -918, + -918, 559, -918, -918, 565, -918, -918, -918, -918, 50, + 4528, -918, 5453, 390, 5501, 978, -918, 4528, 3448, -918, + -918, -918, -918, -918, 515, 401, -918, 515, 515, 515, + 515, 515, 3448, -39, 680, 5768, 392, 532, -918, 38, + 66, -918, -918, 5532, 571, 392, 392, 392, 392, 392, + 392, -126, -918, -918, 573, 5453, 532, 532, 532, 532, + 532, 532, -77, 566, 4528, -918, 189, -918, 591, 690, + 2237, -918, 663, 6089, -918, -918, -918, -918, -918, -918, + -918, -918, 576, 586, 587, -918, -918, 5969, -918, -918, + 590, 18, 594, -918, 582, 3448, 3448, 3448, 3448, 1577, + 3448, 608, 59, -918, -918, 4546, -918, 81, -918, 6860, + 6860, 6235, -918, 781, 782, 784, 785, -918, -918, 218, + 648, -918, -918, -918, -918, 5415, -918, 641, 652, 4476, + -918, 1139, -918, -918, 17, -918, 310, -918, 653, 5501, + 643, 310, 5501, 639, 4341, 1081, 649, 1081, 1081, 1081, + 1081, 1081, 0, -918, -918, 645, 6307, -918, -918, -918, + 5453, 183, -918, 640, -918, 661, 664, 2912, 3068, 655, + 310, 310, 3875, 310, 310, 310, 310, -918, -5, 411, + -918, 867, -918, 3448, 3448, 650, 651, 656, -918, -918, + -918, 3448, -918, 3448, -918, 657, -918, 5883, 6089, -918, + -918, -918, -918, -918, -918, 660, -918, -918, 673, -918, + 4528, 515, 662, 666, 5627, 392, 532, -126, -77, 668, + 670, 978, -918, -918, 392, 671, 671, 671, 671, 671, + 148, 3448, -918, 532, -918, 672, 672, 672, 672, 672, + 200, 3448, -918, 676, -918, 3448, -918, 669, 4359, 6379, + -918, 689, -918, -918, 5658, 5658, 5658, 678, 5658, 679, + 5283, 5658, 1577, 50, 50, 50, 50, 681, -65, 50, + -918, -918, 3582, 3448, 3448, 3448, 3448, 3448, 3448, 3448, + 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, 3448, + 3448, 3448, 3448, 3448, 3046, 3448, -918, -918, -918, -918, + -23, 674, 697, 698, 6451, 12, -918, 1139, 6739, 5400, + 5453, 696, 692, 1139, 1139, 1139, 1139, 1139, 1139, -25, + 672, -918, 411, -918, 682, 310, 316, 683, -918, -918, + 301, 1081, 687, 687, 687, 687, 687, -918, 3448, -918, + -918, 5501, 686, 354, -918, 52, 707, 708, -918, 2070, + -918, -918, -918, 2912, 693, 710, 4528, -918, -918, 310, + 344, 344, 849, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, 695, + 705, -918, -918, 344, 344, 344, 398, 858, -918, 3448, + -918, 2376, 718, -918, 591, 53, 97, -918, -918, -918, + 132, 150, -918, 5969, 87, 818, 1059, -918, -918, 5501, + -918, -126, -77, -918, -918, 5501, 5501, -918, 671, 711, + 712, 672, 713, 720, 3336, -918, -918, -918, 5165, 733, + 743, -918, 714, 738, 745, 3448, 747, 5453, 739, 742, + 748, 746, 4456, 3448, -918, -918, -918, 3772, 4892, 1052, + 1052, 1444, 1444, 1031, 1031, -918, 4510, 4908, 4924, 4964, + 1444, 1444, 75, 75, 50, 50, 50, -918, -918, 216, + 3601, 6523, 889, 761, 901, 903, 904, -918, 767, -25, + 672, -918, -918, -918, -918, -918, -918, 5658, 1139, 3721, + -918, -918, 769, -918, -918, 433, 753, -918, -918, 687, + 5501, 759, 764, -918, -918, 5453, 3448, 3448, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + -918, -918, -918, -918, -918, -918, -918, -918, -918, -918, + 765, -918, 3180, 344, -918, -918, -918, -918, -918, 1717, + 762, 3068, 310, -918, -918, -918, -918, 978, 87, -918, + -918, -918, -4, 768, 770, -918, -918, 771, 773, 5501, + -918, 5501, -918, -918, 6002, 6061, 6075, 5453, 508, -918, + -918, 919, -918, 5165, -918, 776, 778, 777, 783, 803, + -918, -918, 806, -918, -918, 50, 3448, -918, -918, -918, + 217, -918, 222, 805, 225, -918, -918, -918, 808, 819, + 820, 821, 19, 824, 3721, 3721, 3721, 3721, 3721, 1577, + 3721, 4607, -918, 310, 1275, 809, -918, 1275, 5501, 826, + -918, -918, 817, -918, 827, 831, 1890, -918, 2912, 4528, + 833, -918, -918, 839, -918, 836, -918, -918, -918, -918, + -918, 840, 841, 5618, -918, 5618, -918, 5618, -918, -918, + 5618, 5618, 5618, -918, 6595, -918, 3448, 3448, -918, 3448, + -918, 3448, 4528, 1000, 864, 1005, 868, 869, 1008, 872, + 5658, 5658, 5658, 5658, 859, 5314, 5658, 105, 105, 105, + 105, 105, 856, 228, 105, 3721, 3721, 3721, 3721, 3721, + 3721, 3721, 3721, 3721, 3721, 3721, 3721, 3721, 3721, 3721, + 3721, 3721, 3721, 3721, 3314, 3448, -918, -918, 5501, 860, + -918, 1275, -918, -918, 1018, -918, 870, -918, -918, -918, + 978, 978, 978, -918, -918, -918, -918, -918, -918, -918, + -918, -918, 233, 242, 246, 249, 874, -918, 888, -918, + -918, 251, -918, 876, 880, 887, 890, 5453, 879, 883, + 894, 3721, -918, 4718, 4948, 3957, 3957, 1821, 1821, 1352, + 1352, -918, 4564, 334, 4981, 4990, 169, 169, 105, 105, + 105, -918, -918, 272, 3806, 5501, 885, -918, 1275, -918, + -918, 1275, 891, -918, -918, -918, 1275, 1275, -918, -918, + -918, -918, 907, 1042, 1046, 909, -918, 895, 896, 897, + 899, -918, -918, 902, 105, 3721, -918, -918, 910, -918, + 1275, -918, -918, 912, 913, -918, 3448, 3448, 3448, -918, + 3448, 4607, -918, 978, 915, 932, 273, 287, 289, 294, + 978, -918, -918, -918, -918, -918, -918, -918, -918 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1281,192 +1281,192 @@ static const yytype_int16 yypact[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 0, 756, 0, 0, 0, 756, 5, 645, 641, 644, - 752, 753, 647, 648, 0, 0, 0, 0, 0, 0, + 0, 757, 0, 0, 0, 757, 5, 645, 641, 644, + 753, 754, 647, 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 651, 650, 0, 0, 0, 0, 0, 642, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 756, 0, 3, 582, 646, 292, 303, 302, + 0, 0, 757, 0, 3, 582, 646, 292, 303, 302, 386, 387, 389, 390, 371, 0, 0, 401, 368, 400, 395, 392, 391, 394, 372, 0, 0, 373, 393, 403, - 388, 756, 756, 4, 294, 295, 296, 0, 357, 756, - 291, 383, 384, 385, 1, 0, 0, 21, 756, 756, - 756, 22, 756, 756, 756, 0, 38, 756, 0, 0, - 0, 0, 756, 0, 0, 0, 0, 756, 756, 0, - 756, 756, 756, 0, 756, 756, 6, 17, 7, 19, - 0, 15, 16, 18, 69, 40, 756, 756, 0, 756, - 756, 756, 756, 0, 756, 0, 756, 0, 756, 0, + 388, 757, 757, 4, 294, 295, 296, 0, 357, 757, + 291, 383, 384, 385, 1, 0, 0, 21, 757, 757, + 757, 22, 757, 757, 757, 0, 38, 757, 0, 0, + 0, 0, 757, 0, 0, 0, 0, 757, 757, 0, + 757, 757, 757, 0, 757, 757, 6, 17, 7, 19, + 0, 15, 16, 18, 69, 40, 757, 757, 0, 757, + 757, 757, 757, 0, 757, 0, 757, 0, 757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 756, 318, 324, 0, 0, 0, - 606, 0, 756, 317, 0, 756, 756, 0, 0, 0, - 0, 756, 756, 615, 613, 612, 614, 611, 292, 386, + 0, 0, 0, 0, 757, 318, 324, 0, 0, 0, + 606, 0, 757, 317, 0, 757, 757, 0, 0, 0, + 0, 757, 757, 615, 613, 612, 614, 611, 292, 386, 387, 389, 390, 401, 400, 395, 392, 391, 394, 393, - 388, 0, 0, 541, 738, 739, 740, 741, 744, 742, - 746, 745, 743, 747, 727, 728, 0, 0, 756, 733, - 726, 610, 0, 0, 0, 0, 0, 0, 0, 0, + 388, 0, 0, 541, 738, 739, 740, 748, 741, 744, + 742, 746, 745, 743, 747, 727, 728, 0, 0, 757, + 733, 726, 610, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 754, 755, 756, 756, 0, - 369, 370, 402, 392, 397, 396, 399, 293, 0, 398, - 0, 278, 756, 756, 756, 756, 756, 756, 0, 327, - 277, 329, 756, 748, 749, 750, 751, 0, 359, 0, - 331, 0, 0, 58, 60, 0, 756, 756, 52, 41, - 51, 53, 756, 42, 148, 47, 23, 756, 0, 45, - 0, 0, 0, 0, 50, 756, 0, 26, 25, 24, - 48, 44, 0, 152, 0, 151, 0, 54, 0, 20, - 0, 0, 46, 49, 326, 305, 316, 0, 0, 0, - 0, 13, 0, 66, 0, 325, 63, 307, 308, 309, - 357, 756, 304, 0, 540, 539, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 755, 756, 757, 757, + 0, 369, 370, 402, 392, 397, 396, 399, 293, 0, + 398, 0, 278, 757, 757, 757, 757, 757, 757, 0, + 327, 277, 329, 757, 749, 750, 751, 752, 0, 359, + 0, 331, 0, 0, 58, 60, 0, 757, 757, 52, + 41, 51, 53, 757, 42, 148, 47, 23, 757, 0, + 45, 0, 0, 0, 0, 50, 757, 0, 26, 25, + 24, 48, 44, 0, 152, 0, 151, 0, 54, 0, + 20, 0, 0, 46, 49, 326, 305, 316, 0, 0, + 0, 0, 13, 0, 66, 0, 325, 63, 307, 308, + 309, 357, 757, 304, 0, 540, 539, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 319, 0, 756, 321, 0, + 0, 0, 0, 0, 0, 0, 319, 0, 757, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 640, 731, 734, 0, 756, 0, 729, - 206, 624, 625, 626, 627, 628, 629, 632, 633, 639, - 0, 621, 622, 623, 630, 631, 619, 620, 616, 617, - 618, 638, 637, 0, 0, 328, 330, 0, 0, 0, - 756, 279, 0, 268, 756, 756, 756, 756, 756, 284, - 267, 0, 280, 0, 281, 283, 282, 191, 756, 0, - 0, 0, 756, 756, 0, 192, 195, 756, 0, 190, - 756, 365, 0, 362, 361, 356, 360, 0, 738, 739, - 740, 0, 0, 742, 335, 297, 337, 0, 756, 0, - 756, 305, 0, 0, 43, 39, 756, 0, 0, 0, - 0, 0, 756, 374, 0, 756, 326, 305, 0, 325, - 72, 0, 380, 0, 77, 79, 0, 0, 756, 306, - 0, 756, 0, 0, 404, 213, 0, 68, 65, 0, - 312, 359, 0, 589, 588, 605, 595, 591, 593, 594, - 0, 601, 0, 600, 654, 590, 655, 0, 657, 0, - 658, 0, 661, 662, 663, 664, 665, 666, 667, 668, - 669, 670, 597, 0, 0, 0, 320, 0, 596, 599, - 0, 603, 602, 0, 608, 609, 598, 592, 583, 542, - 732, 0, 756, 756, 756, 92, 207, 0, 636, 635, - 300, 299, 301, 285, 756, 269, 274, 270, 271, 273, - 272, 756, 0, 0, 0, 756, 0, 232, 0, 0, - 756, 194, 0, 0, 756, 756, 756, 756, 756, 756, - 756, 246, 245, 0, 256, 0, 0, 0, 0, 0, - 0, 756, 0, 538, 537, 366, 355, 298, 0, 0, - 756, 756, 0, 55, 59, 719, 715, 718, 721, 722, - 198, 0, 0, 0, 717, 723, 0, 725, 724, 0, - 0, 0, 716, 0, 0, 0, 0, 0, 0, 0, - 0, 199, 234, 202, 235, 671, 720, 197, 756, 756, - 756, 376, 0, 0, 0, 0, 378, 756, 0, 0, - 169, 170, 171, 157, 0, 158, 0, 154, 159, 155, - 756, 168, 153, 0, 74, 0, 382, 0, 756, 0, - 0, 756, 0, 0, 756, 0, 756, 756, 756, 756, - 756, 0, 237, 236, 0, 756, 81, 404, 208, 0, - 0, 67, 0, 756, 0, 0, 756, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 64, 756, 756, 172, - 0, 310, 0, 0, 0, 0, 0, 322, 323, 607, - 0, 604, 0, 730, 0, 99, 0, 0, 93, 101, - 96, 100, 95, 97, 0, 94, 98, 0, 187, 634, - 275, 0, 0, 0, 756, 0, 756, 756, 0, 0, - 756, 193, 196, 756, 251, 247, 248, 250, 249, 0, - 756, 226, 0, 257, 262, 258, 259, 261, 260, 0, - 756, 229, 286, 363, 0, 332, 0, 0, 756, 340, - 756, 339, 62, 0, 0, 0, 681, 0, 0, 0, - 0, 0, 689, 688, 687, 686, 0, 0, 685, 61, - 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 640, 731, 734, 0, 757, 0, + 729, 206, 624, 625, 626, 627, 628, 629, 632, 633, + 639, 0, 621, 622, 623, 630, 631, 619, 620, 616, + 617, 618, 638, 637, 0, 0, 328, 330, 0, 0, + 0, 757, 279, 0, 268, 757, 757, 757, 757, 757, + 284, 267, 0, 280, 0, 281, 283, 282, 191, 757, + 0, 0, 0, 757, 757, 0, 192, 195, 757, 0, + 190, 757, 365, 0, 362, 361, 356, 360, 0, 738, + 739, 740, 0, 0, 742, 335, 297, 337, 0, 757, + 0, 757, 305, 0, 0, 43, 39, 757, 0, 0, + 0, 0, 0, 757, 374, 0, 757, 326, 305, 0, + 325, 72, 0, 380, 0, 77, 79, 0, 0, 757, + 306, 0, 757, 0, 0, 404, 213, 0, 68, 65, + 0, 312, 359, 0, 589, 588, 605, 595, 591, 593, + 594, 0, 601, 0, 600, 654, 590, 655, 0, 657, + 0, 658, 0, 661, 662, 663, 664, 665, 666, 667, + 668, 669, 670, 597, 0, 0, 0, 320, 0, 596, + 599, 0, 603, 602, 0, 608, 609, 598, 592, 583, + 542, 732, 0, 757, 757, 757, 92, 207, 0, 636, + 635, 300, 299, 301, 285, 757, 269, 274, 270, 271, + 273, 272, 757, 0, 0, 0, 757, 0, 232, 0, + 0, 757, 194, 0, 0, 757, 757, 757, 757, 757, + 757, 757, 246, 245, 0, 256, 0, 0, 0, 0, + 0, 0, 757, 0, 538, 537, 366, 355, 298, 0, + 0, 757, 757, 0, 55, 59, 719, 715, 718, 721, + 722, 198, 0, 0, 0, 717, 723, 0, 725, 724, + 0, 0, 0, 716, 0, 0, 0, 0, 0, 0, + 0, 0, 199, 234, 202, 235, 671, 720, 197, 757, + 757, 757, 376, 0, 0, 0, 0, 378, 757, 0, + 0, 169, 170, 171, 157, 0, 158, 0, 154, 159, + 155, 757, 168, 153, 0, 74, 0, 382, 0, 757, + 0, 0, 757, 0, 0, 757, 0, 757, 757, 757, + 757, 757, 0, 237, 236, 0, 757, 81, 404, 208, + 0, 0, 67, 0, 757, 0, 0, 757, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 64, 757, 757, + 172, 0, 310, 0, 0, 0, 0, 0, 322, 323, + 607, 0, 604, 0, 730, 0, 99, 0, 0, 93, + 101, 96, 100, 95, 97, 0, 94, 98, 0, 187, + 634, 275, 0, 0, 0, 757, 0, 757, 757, 0, + 0, 757, 193, 196, 757, 251, 247, 248, 250, 249, + 0, 757, 226, 0, 257, 262, 258, 259, 261, 260, + 0, 757, 229, 286, 363, 0, 332, 0, 0, 757, + 340, 757, 339, 62, 0, 0, 0, 681, 0, 0, + 0, 0, 0, 689, 688, 687, 686, 0, 0, 685, + 61, 201, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 57, 56, 379, 756, 0, - 0, 0, 0, 756, 0, 37, 756, 756, 0, 162, - 160, 0, 756, 756, 756, 756, 756, 756, 756, 166, - 73, 756, 381, 0, 0, 0, 0, 314, 313, 0, - 756, 242, 238, 239, 241, 240, 87, 756, 315, 14, - 756, 0, 0, 8, 0, 0, 0, 214, 405, 406, - 216, 217, 756, 0, 220, 222, 219, 215, 0, 179, - 175, 0, 116, 117, 118, 119, 120, 121, 124, 125, - 140, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 144, 143, 127, 126, 113, 115, 114, - 122, 123, 111, 112, 108, 109, 110, 107, 0, 0, - 106, 173, 176, 178, 177, 0, 0, 183, 756, 185, - 0, 0, 70, 311, 0, 0, 656, 659, 660, 0, - 0, 756, 0, 756, 0, 0, 404, 276, 756, 233, - 756, 756, 227, 230, 756, 756, 287, 252, 255, 0, - 263, 266, 0, 367, 334, 333, 336, 0, 0, 342, - 341, 0, 0, 0, 756, 0, 0, 0, 0, 0, - 0, 0, 0, 714, 200, 203, 698, 699, 700, 701, - 702, 703, 706, 707, 713, 0, 695, 696, 697, 704, - 705, 693, 694, 690, 691, 692, 712, 711, 0, 0, - 756, 0, 0, 0, 0, 0, 375, 0, 756, 167, - 147, 145, 150, 146, 156, 163, 0, 756, 0, 164, - 204, 0, 75, 756, 0, 0, 756, 89, 243, 756, - 0, 0, 209, 404, 0, 756, 756, 211, 212, 408, - 409, 413, 410, 418, 411, 412, 414, 415, 416, 417, - 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, - 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, - 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, - 459, 460, 461, 462, 463, 464, 465, 466, 486, 467, - 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, - 478, 479, 480, 481, 482, 483, 484, 485, 487, 488, - 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, - 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, - 509, 510, 511, 512, 513, 756, 530, 531, 532, 523, - 535, 519, 520, 518, 525, 526, 514, 515, 516, 517, - 524, 522, 529, 527, 533, 528, 521, 534, 407, 0, - 218, 221, 180, 174, 142, 141, 182, 186, 756, 0, - 207, 0, 586, 585, 587, 584, 756, 756, 188, 105, - 102, 0, 0, 0, 228, 231, 0, 0, 756, 253, - 756, 264, 364, 746, 0, 745, 0, 0, 343, 345, - 735, 756, 0, 680, 0, 0, 0, 0, 0, 678, - 677, 0, 683, 684, 672, 0, 710, 709, 377, 0, - 27, 0, 0, 0, 36, 165, 161, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 57, 56, 379, 757, + 0, 0, 0, 0, 757, 0, 37, 757, 757, 0, + 162, 160, 0, 757, 757, 757, 757, 757, 757, 757, + 166, 73, 757, 381, 0, 0, 0, 0, 314, 313, + 0, 757, 242, 238, 239, 241, 240, 87, 757, 315, + 14, 757, 0, 0, 8, 0, 0, 0, 214, 405, + 406, 216, 217, 757, 0, 220, 222, 219, 215, 0, + 179, 175, 0, 116, 117, 118, 119, 120, 121, 124, + 125, 140, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 144, 143, 127, 126, 113, 115, + 114, 122, 123, 111, 112, 108, 109, 110, 107, 0, + 0, 106, 173, 176, 178, 177, 0, 0, 183, 757, + 185, 0, 0, 70, 311, 0, 0, 656, 659, 660, + 0, 0, 757, 0, 757, 0, 0, 404, 276, 757, + 233, 757, 757, 227, 230, 757, 757, 287, 252, 255, + 0, 263, 266, 0, 367, 334, 333, 336, 0, 0, + 342, 341, 0, 0, 0, 757, 0, 0, 0, 0, + 0, 0, 0, 0, 714, 200, 203, 698, 699, 700, + 701, 702, 703, 706, 707, 713, 0, 695, 696, 697, + 704, 705, 693, 694, 690, 691, 692, 712, 711, 0, + 0, 757, 0, 0, 0, 0, 0, 375, 0, 757, + 167, 147, 145, 150, 146, 156, 163, 0, 757, 0, + 164, 204, 0, 75, 757, 0, 0, 757, 89, 243, + 757, 0, 0, 209, 404, 0, 757, 757, 211, 212, + 408, 409, 413, 410, 418, 411, 412, 414, 415, 416, + 417, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 465, 466, 486, + 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 479, 480, 481, 482, 483, 484, 485, 487, + 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, + 508, 509, 510, 511, 512, 513, 757, 530, 531, 532, + 523, 535, 519, 520, 518, 525, 526, 514, 515, 516, + 517, 524, 522, 529, 527, 533, 528, 521, 534, 407, + 0, 218, 221, 180, 174, 142, 141, 182, 186, 757, + 0, 207, 0, 586, 585, 587, 584, 757, 757, 188, + 105, 102, 0, 0, 0, 228, 231, 0, 0, 757, + 253, 757, 264, 364, 746, 0, 745, 0, 0, 343, + 345, 735, 757, 0, 680, 0, 0, 0, 0, 0, + 678, 677, 0, 683, 684, 672, 0, 710, 709, 377, + 0, 27, 0, 0, 0, 36, 165, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 205, 543, 0, 78, 0, 83, 80, 756, 0, 244, - 756, 0, 9, 0, 0, 0, 223, 756, 224, 0, - 181, 71, 0, 189, 0, 103, 652, 756, 756, 756, - 0, 0, 0, 348, 0, 347, 0, 346, 736, 0, - 0, 0, 737, 756, 344, 0, 0, 682, 0, 679, - 0, 708, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 558, 556, 555, 557, - 554, 0, 0, 553, 0, 0, 0, 0, 0, 0, + 0, 205, 543, 0, 78, 0, 83, 80, 757, 0, + 244, 757, 0, 9, 0, 0, 0, 223, 757, 224, + 0, 181, 71, 0, 189, 0, 103, 652, 757, 757, + 757, 0, 0, 0, 348, 0, 347, 0, 346, 736, + 0, 0, 0, 737, 757, 344, 0, 0, 682, 0, + 679, 0, 708, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 558, 556, 555, + 557, 554, 0, 0, 553, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 76, 85, 756, 0, 756, - 82, 210, 12, 10, 536, 0, 756, 404, 104, 756, - 756, 756, 756, 756, 354, 353, 352, 351, 350, 349, - 338, 0, 0, 0, 0, 0, 28, 0, 33, 35, - 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 581, 567, 568, 569, 570, 571, 572, 573, 574, - 580, 0, 564, 565, 566, 562, 563, 559, 560, 561, - 579, 578, 0, 0, 756, 0, 756, 88, 11, 225, - 184, 0, 290, 289, 288, 254, 265, 675, 674, 676, - 673, 0, 0, 0, 0, 552, 0, 0, 0, 0, - 550, 549, 0, 544, 0, 577, 576, 0, 756, 90, - 653, 29, 0, 0, 31, 0, 0, 0, 551, 0, - 575, 756, 756, 0, 0, 0, 0, 0, 0, 756, - 84, 34, 32, 547, 546, 548, 545, 86 + 0, 0, 0, 0, 0, 0, 76, 85, 757, 0, + 757, 82, 210, 12, 10, 536, 0, 757, 404, 104, + 757, 757, 757, 757, 757, 354, 353, 352, 351, 350, + 349, 338, 0, 0, 0, 0, 0, 28, 0, 33, + 35, 0, 30, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 581, 567, 568, 569, 570, 571, 572, 573, + 574, 580, 0, 564, 565, 566, 562, 563, 559, 560, + 561, 579, 578, 0, 0, 757, 0, 757, 88, 11, + 225, 184, 0, 290, 289, 288, 254, 265, 675, 674, + 676, 673, 0, 0, 0, 0, 552, 0, 0, 0, + 0, 550, 549, 0, 544, 0, 577, 576, 0, 757, + 90, 653, 29, 0, 0, 31, 0, 0, 0, 551, + 0, 575, 757, 757, 0, 0, 0, 0, 0, 0, + 757, 84, 34, 32, 547, 546, 548, 545, 86 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -913, -913, -313, -913, -42, -913, -913, 767, -123, -913, - 235, -421, 437, -121, -913, -913, -177, -913, -913, -237, - -913, -913, -913, 752, -913, -913, -913, -913, -913, -350, - -913, -913, -110, -913, -913, -913, -913, 203, 383, -664, - -913, -700, -725, -549, -913, -155, -913, 16, -519, -913, - -483, -912, -913, -448, 245, -647, -221, 389, -35, -86, - 137, 64, -266, -638, 763, 665, -162, -113, -913, -103, - -913, -913, -913, -913, -182, -100, -913, -451, -913, -913, - -36, -8, -913, -913, -913, -913, -13, -29, -913, -913, - -703, -913, -109, -913, -590, -135, -60, 328, 703, 309, - -913, -913, -913, 691, -88, 199, 861, -486, -1 + -918, -918, -304, -918, -28, -918, -918, 774, -103, -918, + 1012, -428, 445, -89, -918, -918, -145, -918, -918, -214, + -918, -918, -918, 772, -918, -918, -918, -918, -918, -308, + -918, -918, -105, -918, -918, -918, -918, 221, 408, -634, + -918, -701, -745, -479, -918, -135, -918, 39, -463, -918, + -500, -917, -918, -436, 265, -649, -409, -59, -158, -88, + -61, 22, -279, -635, 788, 793, -163, -133, -918, -130, + -918, -918, -918, -918, -162, -124, -918, -457, -918, -918, + 16, 21, -918, -918, -918, -918, 48, 47, -918, -918, + -726, -918, -96, -918, -589, -107, -60, 175, 517, 145, + -918, -918, -918, 706, 206, -47, 152, -468, -1 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 4, 5, 912, 913, 137, 521, 138, 139, 307, - 140, 292, 293, 141, 529, 523, 746, 329, 705, 890, - 343, 708, 711, 344, 910, 1407, 1474, 1089, 1317, 584, - 971, 1072, 142, 326, 696, 697, 698, 699, 700, 747, - 1238, 748, 777, 464, 465, 670, 671, 1079, 409, 731, - 527, 923, 924, 466, 673, 721, 794, 804, 278, 279, - 91, 92, 345, 180, 346, 93, 289, 94, 640, 95, - 641, 820, 1018, 1019, 1268, 96, 97, 475, 471, 472, - 98, 99, 143, 687, 868, 144, 100, 101, 102, 103, - 732, 733, 918, 1228, 632, 353, 354, 1310, 213, 65, - 674, 675, 227, 228, 1269, 1270, 621, 66, 145 + -1, 4, 5, 913, 914, 137, 522, 138, 139, 308, + 140, 293, 294, 141, 530, 524, 747, 330, 706, 891, + 344, 709, 712, 345, 911, 1408, 1475, 1090, 1318, 585, + 972, 1073, 142, 327, 697, 698, 699, 700, 701, 748, + 1239, 749, 778, 465, 466, 671, 672, 1080, 410, 732, + 528, 924, 925, 467, 674, 722, 795, 805, 279, 280, + 91, 92, 346, 180, 347, 93, 290, 94, 641, 95, + 642, 821, 1019, 1020, 1269, 96, 97, 476, 472, 473, + 98, 99, 143, 688, 869, 144, 100, 101, 102, 103, + 733, 734, 919, 1229, 633, 354, 355, 1311, 213, 65, + 675, 676, 228, 229, 1270, 1271, 622, 66, 145 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1474,334 +1474,290 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 6, 212, 502, 304, 676, 891, 281, 323, 181, 325, - 1229, 781, 356, 607, 358, 359, 360, 361, 826, 363, - 389, 365, 979, 367, 911, 704, 637, 347, 709, 492, - -748, 183, -749, 611, 764, 1334, 182, 348, 603, 383, - 349, 255, 672, 256, 840, 187, 895, 104, -750, 828, - 391, 392, 264, 265, 266, 406, 399, 400, 1373, 269, - 638, 230, 509, 763, -751, 1006, 402, 899, 644, 901, - 902, 903, 904, 905, 549, 929, 930, 407, 972, 973, - 974, 975, 408, 153, 408, 403, 260, 766, 402, 402, - 280, 280, 1061, 550, 214, 215, 216, 800, 290, 810, - -748, 801, -749, -748, 350, -749, 402, 588, 1033, 306, - 402, 1062, 811, 240, 402, 283, 284, 285, -750, 148, - 1078, -750, 402, 402, 1362, 1242, 149, 352, 993, 1243, - 906, 907, 351, 1244, -751, 800, -91, -751, -91, 258, - -91, 1245, 1286, 1363, 1364, 355, 355, 1392, 355, 355, - 355, 355, 261, 355, 514, 355, 255, 355, 256, 893, - 217, 218, 896, 1365, 792, 612, 813, 150, 10, 814, - 11, 435, 436, 355, 710, 240, 841, 264, 265, 266, - 269, 290, 347, 680, 355, 355, 1335, 452, 454, 532, - 355, 355, 348, 433, 188, 349, 219, 220, 829, 221, - 151, 1067, 874, 976, 222, 152, 223, 1374, 725, 154, - 1009, 347, 257, 1367, 402, 347, 402, 286, 977, 978, - 1012, 348, 156, 402, 349, 348, 155, 410, 349, 981, - 1084, 146, 1368, 1451, 264, 1487, 402, 449, 451, 453, - 455, 456, 1488, 252, 253, 254, 620, 402, 184, 147, - 1250, 1493, 565, 1088, 287, 1489, 280, 280, 476, 350, - 790, 229, 1095, 157, 1232, 982, 1490, 1002, 1003, 282, - 1494, 450, 280, 280, 450, 450, 469, 1402, 1403, 1404, - 1096, 473, 352, 512, 267, 513, 158, 351, 350, 159, - 402, 160, 350, 1252, 402, 1, 2, 3, 161, 983, - 402, 249, 250, 251, 294, 252, 253, 254, 162, 1505, - 240, 352, 402, 1533, 6, 352, 351, 1090, 402, 1534, - 351, 727, 316, 728, 729, 730, 524, 818, 525, 401, - 526, 1535, 331, 163, -91, 999, -91, 1536, -91, 601, - 782, 468, 164, 298, 299, 300, 994, 301, 303, 305, - 290, 165, 309, 166, 1247, 676, 442, 314, 443, 167, - 444, 1091, 320, 321, 168, 324, 327, 328, 169, 332, - 333, 170, 1081, 816, 873, 601, 788, 385, 171, 524, - 388, 525, 172, 980, 786, 173, 355, 174, 1239, 185, - 1321, 601, 789, 672, 795, 796, 797, 798, 799, 189, - 977, 978, 1085, 445, 186, 593, 585, 190, 1082, 596, - 597, 598, 599, 600, 467, 1415, 270, 191, 271, 192, - 272, 915, 916, 602, 404, 405, 259, 608, 609, 623, - 268, 624, 295, 625, 247, 248, 249, 250, 251, 450, - 252, 253, 254, 450, 450, 450, 450, 450, 476, 1253, - 977, 978, 1236, 800, 1008, 1256, 1257, 450, 977, 978, - 1314, 450, 450, 273, 810, 1011, 622, 1087, 907, 634, - 441, 1349, 1350, 1351, 310, 518, 626, 1093, 1094, 888, - 311, 1254, 1255, 446, 214, 215, 216, 312, 485, 677, - 487, 313, 701, 977, 978, 6, 317, 447, 318, 319, - 322, 384, 448, 386, 702, 387, 393, 497, 477, 498, - 499, 500, 501, 408, 440, 488, 470, 723, -267, 489, - 6, 1332, 503, 505, 606, 468, 347, 528, 490, 511, - 515, 303, 309, 516, 520, 402, 348, 494, 519, 349, - 1318, 522, 533, 274, 534, 580, 535, 536, 537, 530, - 217, 218, 538, 539, 468, 1060, 627, 275, 540, 780, - 541, 542, 276, 1000, 543, 544, 545, 277, 547, 551, - 628, 567, 1007, 546, 548, 629, 552, 553, 554, 555, - 630, 410, 469, 778, 556, 557, 219, 220, 566, 221, - 558, 559, 570, 450, 222, 560, 223, 605, 467, 561, - 634, 562, 568, 350, 622, 229, 569, 571, 837, 585, - 572, 573, 891, 622, 622, 622, 622, 622, 622, 410, - 181, 594, 574, 576, 224, 577, 352, 467, 225, 583, - 410, 351, 590, 226, 592, -269, 601, 639, 610, 6, - 821, 1246, 595, 183, 636, 642, 678, 468, 182, 681, - 703, 682, 683, 684, 714, 1068, 685, 726, 294, 706, - 758, 750, 795, 796, 797, 798, 799, 759, 785, 783, - 635, 752, 283, 284, 285, 715, 468, 753, 760, 716, - 294, 701, 761, 762, 793, 802, 6, 812, 294, -358, - 815, 819, 984, 985, 1482, 1483, 1484, 823, 831, 622, - 989, 824, 990, 825, 827, 64, 830, 469, 839, 1340, - 469, 1341, 869, 723, 1481, 723, 723, 723, 723, 723, - 467, 476, 717, 643, 870, 871, 211, 872, 875, 877, - 181, 751, 919, 1313, 878, 926, 1316, 892, 894, 917, - 897, 784, 900, 908, 920, 921, 778, 410, 986, 467, - 928, 765, 676, 183, 1070, 996, 1071, 995, 182, 193, - 194, 195, 196, 197, 987, 988, 231, 1073, 1408, 991, - 997, 998, 468, 800, 286, 468, 1004, 1005, 1017, 810, - 404, 767, -276, 622, 1014, 410, 410, 1024, 1026, 778, - 672, 1032, 622, 1063, 768, 769, 1064, 1530, 1065, 634, - 1076, 1083, 718, 1058, 1537, 1086, 1077, 1092, 907, 634, - 770, 1097, 1098, 357, 1231, 1230, 719, 1233, 362, 1020, - 364, 720, 366, 803, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 378, 379, 380, 381, 382, 1234, - 771, 294, 1237, 772, 1235, 467, 773, 468, 467, 390, - 1249, 1241, 1258, 395, 396, 397, 1007, 631, 1475, 1259, - 1260, 1261, 774, 1272, 1271, 701, 1273, 6, 1274, 1275, - 1289, 1279, 1280, 1282, 775, 622, 1277, 1281, 1290, 1392, - 1291, 622, 622, 622, 622, 622, 622, 1080, 776, 1276, - 410, 1292, 1293, 398, 1294, 1312, 1315, 880, 1319, 723, - 238, 239, 1320, 1352, 1326, 468, 634, 1248, 1330, 469, - 1336, 240, 1370, 865, 866, 1337, 1338, 1339, 1355, 1356, - 467, 926, 1357, 1358, 1359, 1507, 1360, 1366, 914, 1369, - 1371, 1372, 1375, 439, 1406, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, - 426, 427, 428, 429, 430, 431, 181, 434, 1353, 288, - 1323, 1324, 438, 1409, 1417, 1411, 294, 1412, 1435, 1413, - 1410, 1416, 1418, 1436, 468, 1422, 1423, 634, 467, 183, - 236, 237, 238, 239, 182, 1437, 1440, 1419, 1420, 1421, - 585, 1438, 280, 240, 1446, 787, 1439, 469, 493, 410, - 410, 1441, 1450, 469, 469, 1399, 1400, 1401, 1476, 1402, - 1403, 1404, 1478, 1492, 1479, 805, 806, 807, 808, 809, - 1491, 1495, 1500, 355, 1496, 504, 214, 215, 216, 1497, - 1498, 1501, 1502, 1508, 1511, 247, 248, 249, 250, 251, - 1512, 252, 253, 254, 1510, 1513, 1514, 467, 1515, 1516, - 1531, 564, 1322, 283, 284, 285, 738, 1517, 1518, 1477, - 739, 1519, 468, 1532, 1331, 1521, 1480, 1080, 468, 468, - 1523, 1524, 1485, 1486, 495, 1405, 622, 876, 1075, 822, - 508, 1074, 585, 1329, 1295, 585, 1035, 563, 469, 889, - 1354, 510, 217, 218, 355, 355, 1325, 582, 0, 0, - 0, 0, 0, 740, 578, 579, 283, 284, 285, 613, - 0, 586, 324, 614, 0, 245, 246, 247, 248, 249, - 250, 251, 0, 252, 253, 254, 1509, 0, 219, 220, - 0, 221, 0, 0, 0, 467, 222, 0, 223, 0, - 0, 467, 467, 0, 0, 0, 0, 0, 0, 0, - 486, 0, 0, 468, 741, 286, 615, 0, 1522, 0, - 0, 1333, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 1529, 0, 633, 1001, 1343, 1345, 1347, 707, 0, - 0, -268, 0, 742, 0, 724, 0, 0, 0, 0, - 0, 1010, 0, 0, 1251, 0, 0, 743, 0, 0, - 0, 0, 744, 0, 919, 0, 0, 745, 286, 0, - 0, 531, 754, 0, 755, 0, 756, 0, 0, 713, - 0, 0, 0, 0, 0, 1278, 467, 0, 0, 737, - 0, 0, 0, 0, 0, 0, 616, 677, 0, 0, - 0, 0, 214, 215, 216, 778, 280, 0, 1382, 0, - 617, 0, 0, 0, 1424, 618, 1425, 469, 1426, 469, - 619, 1427, 1428, 1429, 0, 1069, 0, 0, 0, 0, - 6, 0, 805, 806, 807, 808, 809, 0, 0, 0, - 283, 284, 285, 881, 0, 624, 0, 882, 0, 0, - 779, 0, 0, 914, 0, 1431, 1432, 0, 1433, 0, - 1434, 0, 468, 474, 633, 0, 0, 0, 217, 218, - 0, 0, 0, 0, 0, 0, 469, 0, 0, 585, - 0, 0, 468, 0, 468, 0, 926, 0, 0, 0, - 883, 0, 0, 836, 0, 0, 585, 585, 585, 0, - 0, 0, 817, 1472, 219, 220, 70, 221, 71, 72, - 73, 0, 222, 1392, 223, 0, 0, 0, 0, 1386, - 1387, 1388, 1389, 1390, 1391, 0, 0, 832, 833, 834, - 835, 0, 838, 0, 1392, 467, 80, 0, 0, 722, - 0, 468, 286, 0, 0, 0, 581, 1311, 1390, 1391, - 749, 226, 263, 486, 0, 467, 0, 467, 0, 1392, - 0, 0, 0, 0, 0, 0, 469, 0, 585, 0, - 884, 82, 83, 0, 0, 585, 0, 0, 778, 778, - 778, 585, 585, 0, 885, 0, 0, 0, 88, 886, - 0, 0, 0, 90, 887, 0, 0, 0, 0, 925, - 0, 0, 0, 0, 0, 0, 0, 233, 234, 235, - 236, 237, 238, 239, 467, 1525, 1526, 1527, 0, 1528, - 0, 0, 0, 240, 0, 1348, 1010, 0, 0, 0, - 0, 468, 0, 469, 0, 585, 0, 1397, 1398, 1399, - 1400, 1401, 0, 1402, 1403, 1404, 0, 0, 1021, 1022, - 1023, 0, 1025, 0, 1028, 1029, 1030, 0, 1397, 1398, - 1399, 1400, 1401, 633, 1402, 1403, 1404, 585, 0, 1388, - 1389, 1390, 1391, 633, 0, 0, 0, 1013, 0, 0, - 585, 778, 1392, 1397, 1398, 1399, 1400, 1401, 778, 1402, - 1403, 1404, 0, 0, 1031, 0, 0, 0, 468, 0, - 0, 0, 0, 0, 467, 1036, 1037, 1038, 1039, 1040, - 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, - 1051, 1052, 1053, 1054, 1055, 1056, 749, 1059, 0, 0, - 0, 749, 214, 215, 216, 722, 0, 722, 722, 722, - 722, 722, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 0, 252, 253, 254, 0, 0, 0, 0, - 749, 749, 0, 749, 749, 749, 749, 0, 0, 0, - 633, 467, 1311, 1311, 1311, 1311, 1311, 0, 1311, 0, - 0, 0, 0, 0, 0, 925, 0, 0, 0, 0, - 0, 1376, 1377, 1378, 1379, 1380, 0, 1383, 217, 218, - 0, 0, 0, 0, 0, 1499, 1397, 1398, 1399, 1400, - 1401, 0, 1402, 1403, 1404, 232, 233, 234, 235, 236, - 237, 238, 239, 0, 0, 0, 0, 0, 0, 330, - 0, 0, 240, 0, 219, 220, 0, 221, 0, 0, - 0, 633, 222, 1240, 223, 0, 0, 0, 0, 0, - 0, 0, 0, 1311, 1311, 1311, 1311, 1311, 1311, 1311, - 1311, 1311, 1311, 1311, 1311, 1311, 1311, 1311, 1311, 1311, - 1311, 1311, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, - 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, - 1470, 0, 0, 0, 0, 1284, 0, 0, 0, 0, - 0, 1296, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 749, 0, 0, 0, 1311, - 0, 722, 0, 7, 8, 9, 10, 0, 11, 12, - 13, 198, 68, 0, 0, 0, 0, 0, 1503, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 749, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 0, 252, 253, 254, 0, 0, 0, 589, 0, - 15, 69, 0, 1311, 199, 0, 200, 201, 202, 74, - 75, 0, 20, 76, 0, 0, 203, 22, 0, 0, - 78, 0, 1520, 0, 0, 23, 24, 204, 478, 479, - 480, 26, 0, 0, 205, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 206, 234, 235, 236, 237, 238, 239, 0, 44, 0, - 45, 0, 46, 0, 0, 0, 240, 47, 0, 207, - 208, 50, 0, 0, 51, 84, 0, 0, 0, 52, - 0, 0, 53, 85, 86, 87, 209, 0, 0, 89, - 0, 210, 0, 0, 217, 218, 232, 233, 234, 235, - 236, 237, 238, 239, 56, 0, 0, 57, 58, 59, - 0, 0, 60, 240, 61, 62, 0, 0, 63, 0, - 0, 0, 0, 0, 1328, 0, 0, 0, 0, 0, - 483, 220, 0, 221, 0, 0, 0, 0, 222, 0, - 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 214, 215, 216, 0, 0, - 0, 0, 0, 1381, 0, 0, 0, 287, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1361, 0, - 0, 0, 0, 0, 0, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 0, 252, 253, 254, 0, + 6, 212, 912, 980, 282, 892, 1230, 348, 305, 705, + 349, 1335, 503, 782, 258, 230, 350, 493, 256, 390, + 257, 638, 827, 677, 409, 187, 608, 324, 767, 261, + 710, 407, 604, 829, 1374, 612, 104, 403, 268, 801, + 357, 326, 359, 360, 361, 362, 1007, 364, 307, 366, + 510, 368, 148, 408, 639, 673, 404, 153, 295, 621, + 181, 231, 645, -749, 149, 182, 900, 384, 902, 903, + 904, 905, 906, 409, 841, 550, 317, 896, 392, 393, + 403, 150, 403, 241, 400, 401, 332, 256, 811, 257, + 281, 281, 183, 151, 551, 262, 146, 259, 291, 589, + 271, 1034, 272, 155, 273, 765, 930, 931, 241, 973, + 974, 975, 976, 152, 147, 450, 452, 454, 456, 457, + 764, 284, 285, 286, 1062, 1079, 602, 783, 265, 266, + 267, 386, 994, -749, 389, 270, -749, 525, 1393, 526, + 801, 527, 154, 1063, 977, 356, 356, 274, 356, 356, + 356, 356, 513, 356, 514, 356, 351, 356, 802, 978, + 979, 352, 1336, 348, 907, 908, 349, 613, 184, 812, + 436, 437, 350, 356, 188, 156, 711, 793, 1068, 405, + 406, 291, 830, 1375, 356, 356, 453, 455, 353, 533, + 356, 356, 348, 681, 434, 349, 348, 787, 1096, 349, + 403, 350, 1393, 602, 789, 350, 842, 796, 797, 798, + 799, 800, 1010, 253, 254, 255, 1097, 468, 726, 1243, + 157, 875, 1013, 287, 10, 442, 11, 275, 411, -750, + 894, 602, 790, 897, 250, 251, 252, -751, 253, 254, + 255, 276, 158, 486, 403, 488, 277, 916, 917, 983, + 289, 278, 1089, 265, 266, 267, 270, 281, 281, 159, + 288, 1085, 498, 1244, 499, 500, 501, 502, 1403, 1404, + 1405, 1253, 451, 281, 281, 451, 451, 470, 519, 403, + 160, 566, 474, 594, 512, 161, 982, 597, 598, 599, + 600, 601, 889, 520, 984, 1233, 523, 403, 1245, -750, + 469, 603, -750, 791, 531, 609, 610, -751, -752, 283, + -751, 265, 351, 801, 1009, 6, 1246, 352, 162, 1091, + 284, 285, 286, 739, 1003, 1004, 163, 740, 1400, 1401, + 1402, 164, 1403, 1404, 1405, 477, 814, 819, 165, 815, + 995, 351, 166, 567, 353, 351, 352, 571, 1000, 167, + 352, 291, 1387, 1388, 1389, 1390, 1391, 1392, 1248, 168, + 230, 817, 169, 403, 1363, 811, 1012, 1393, 1322, 1365, + 741, 170, 1368, 353, 677, 403, 1001, 353, -752, 171, + 403, -752, 1287, 1364, 874, 1008, 318, 356, 1366, 403, + 1240, 1369, 1083, 403, 1452, 172, 403, 596, 1494, 1488, + 606, 468, 284, 285, 286, 614, 673, 586, 1489, 615, + 632, 1416, 1490, 295, 443, 1491, 444, 1495, 445, 403, + 403, 742, 287, 173, 728, 636, 729, 730, 731, 1082, + 468, 174, 1092, 185, 403, 295, 403, 781, 1506, 1534, + 451, 403, 487, 295, 451, 451, 451, 451, 451, 186, + 743, 189, 616, 1535, 190, 1536, 191, 715, 451, 192, + 1537, 446, 451, 451, 744, 1088, 908, 623, 1069, 745, + 635, 1, 2, 3, 746, 796, 797, 798, 799, 800, + 978, 979, 1086, 607, 469, 260, 752, 1396, 1397, 269, + 678, 1398, 1399, 1400, 1401, 1402, 6, 1403, 1404, 1405, + 1094, 1095, 1333, 532, 287, 703, 296, 348, 978, 979, + 349, 311, 312, 469, 313, 314, 350, 319, 724, 64, + 1254, 6, 320, 468, 323, 477, 1257, 1258, 385, -91, + 387, -91, 617, -91, 388, 405, 394, 402, 1255, 1256, + 409, 447, 471, 441, 785, 624, 618, 625, 788, 626, + -267, 619, 468, 478, 702, 448, 620, 525, 489, 526, + 449, 981, 978, 979, 1237, 1061, 490, 491, 806, 807, + 808, 809, 810, 193, 194, 195, 196, 197, 804, 506, + 232, 504, 411, 470, 779, -91, 516, -91, 529, -91, + 517, 521, 627, 403, 451, 534, 295, 978, 979, 1315, + 535, 635, 536, 515, 537, 623, 469, 538, 539, 838, + 586, 1319, 892, 540, 623, 623, 623, 623, 623, 623, + 411, 1350, 1351, 1352, 541, 542, 543, 786, 544, 545, + 546, 411, 547, 548, 552, 469, 581, 549, 553, 554, + 6, 822, 890, 555, 556, 557, 558, 559, 468, 560, + 561, 468, 881, 568, 562, 563, 351, 569, 570, 572, + 573, 352, 574, 637, 575, 577, 578, 584, 591, 1008, + 593, 723, 628, 181, -269, 1483, 1484, 1485, 182, 595, + 602, 682, 750, 915, 1247, 487, 629, 6, 353, 611, + 640, 630, 1482, 985, 986, 643, 631, 679, 683, 684, + 623, 990, 685, 991, 686, 183, 704, 399, 470, 707, + 759, 470, 727, 751, 724, 760, 724, 724, 724, 724, + 724, 295, 753, 468, 754, 762, 761, 1002, 784, 763, + 794, 469, 803, 920, 469, 813, 927, -358, 816, 820, + 824, 825, 826, 702, 1011, 828, 832, 779, 411, 831, + 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, + 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 677, 435, 1074, 840, 1071, 1314, 439, 1531, 1317, + 1341, 468, 1342, 181, 623, 1538, 411, 411, 182, 1072, + 779, 870, 871, 623, 872, 873, 876, 878, 477, 879, + 635, 893, 895, 673, 1059, 898, 469, 918, 901, 921, + 635, 909, 922, 494, 929, 183, 987, 988, 1070, 997, + 1021, 1064, 989, 992, 996, 806, 807, 808, 809, 810, + 999, 998, 1005, 1076, 1006, 1015, 801, 811, 1018, 1409, + 505, -276, 1025, 1027, 1065, 1066, 1077, 1033, 1084, 1087, + 468, 1078, 908, 1093, 211, 1098, 1099, 1232, 750, 1234, + 1231, 1235, 1238, 750, 469, 1242, 1250, 723, 6, 723, + 723, 723, 723, 723, 1236, 1259, 623, 1261, 475, 1272, + 1274, 1260, 623, 623, 623, 623, 623, 623, 1081, 1262, + 1273, 411, 750, 750, 1275, 750, 750, 750, 750, 1290, + 724, 1276, 564, 1278, 1282, 1280, 1249, 635, 1281, 1291, + 470, 1292, 1283, 1293, 1294, 1295, 1313, 1316, 1277, 579, + 580, 70, 927, 71, 72, 73, 587, 702, 1320, 1476, + 1321, 1331, 1327, 469, 1353, 1337, 1338, 1339, 468, 1340, + 1356, 358, 1357, 1358, 468, 468, 363, 1359, 365, 1252, + 367, 80, 369, 370, 371, 372, 373, 374, 375, 376, + 377, 378, 379, 380, 381, 382, 383, 264, 1354, 1360, + 1361, 1367, 1370, 1407, 1371, 1372, 1373, 391, 635, 1376, + 1279, 396, 397, 398, 1412, 1418, 82, 83, 634, 1324, + 1325, 586, 1410, 281, 1413, 766, 1508, 1414, 470, 1417, + 411, 411, 1419, 88, 470, 470, 1423, 1424, 90, 181, + 1436, 767, 1437, 1411, 182, 1438, 1439, 1440, 1441, 1011, + 1442, 469, 1451, 1447, 356, 768, 1477, 469, 469, 468, + 1420, 1421, 1422, 1479, 714, 1493, 1497, 1480, 769, 770, + 1492, 183, 1496, 1498, 738, 1501, 1499, 750, 915, 1502, + 1503, 1509, 1513, 723, 771, 1512, 1514, 1515, 1511, 1516, + 1517, 1518, 440, 1532, 241, 1519, 1520, 1323, 1081, 214, + 215, 216, 237, 238, 239, 240, 1522, 623, 1524, 1525, + 1533, 750, 496, 586, 772, 241, 586, 773, 823, 470, + 774, 284, 285, 286, 716, 356, 356, 1332, 717, 1406, + 1075, 509, 1478, 877, 1330, 780, 775, 1036, 1296, 1481, + 1326, 1355, 469, 583, 0, 1486, 1487, 511, 776, 634, + 299, 300, 301, 217, 302, 304, 306, 0, 0, 310, + 0, 0, 777, 0, 315, 218, 219, 0, 0, 321, + 322, 718, 325, 328, 329, 0, 333, 334, 0, 284, + 285, 286, 882, 0, 625, 0, 883, 818, 0, 0, + 1334, 0, 0, 0, 214, 215, 216, 0, 0, 1510, + 0, 220, 221, 0, 222, 214, 215, 216, 468, 223, + 565, 224, 833, 834, 835, 836, 0, 839, 248, 249, + 250, 251, 252, 287, 253, 254, 255, 0, 468, 884, + 468, 1523, 0, 0, 0, 920, 0, 246, 247, 248, + 249, 250, 251, 252, 1530, 253, 254, 255, 217, 0, + 1349, 719, 0, 0, 1312, 1251, 0, 0, 0, 217, + 218, 219, 0, 0, 0, 720, 0, 0, 678, 0, + 721, 218, 219, 0, 0, 0, 779, 281, 0, 1383, + 0, 287, 0, 0, 926, 0, 0, 468, 470, 0, + 470, 469, 0, 0, 0, 0, 220, 221, 0, 222, + 0, 6, 0, 0, 223, 0, 224, 220, 221, 885, + 222, 469, 0, 469, 0, 223, 0, 224, 0, 0, + 0, 0, 766, 886, 0, 0, 1432, 1433, 887, 1434, + 0, 1435, 0, 888, 0, 0, 0, 708, 0, 304, + 310, 316, 0, 0, 725, 495, 0, 470, 634, -268, + 586, 0, 768, 0, 0, 0, 0, 927, 634, 214, + 215, 216, 1014, 0, 0, 769, 770, 586, 586, 586, + 469, 755, 0, 756, 1473, 757, 0, 468, 0, 1032, + 0, 771, 0, 0, 0, 0, 0, 0, 0, 0, + 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, + 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, + 1057, 772, 1060, 217, 773, 1393, 0, 774, 0, 0, + 0, 0, 0, 0, 750, 218, 219, 0, 0, 0, + 1500, 0, 0, 775, 0, 0, 0, 470, 0, 586, + 0, 0, 0, 0, 468, 776, 586, 0, 0, 779, + 779, 779, 586, 586, 0, 634, 0, 0, 0, 777, + 469, 220, 221, 0, 222, 0, 0, 0, 0, 223, + 926, 224, 0, 0, 0, 0, 0, 0, 0, 1312, + 1312, 1312, 1312, 1312, 0, 1312, 1526, 1527, 1528, 0, + 1529, 0, 837, 0, 0, 750, 239, 240, 0, 225, + 1344, 1346, 1348, 226, 470, 0, 586, 241, 227, 1377, + 1378, 1379, 1380, 1381, 0, 1384, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 634, 469, 1241, 0, + 0, 644, 0, 0, 0, 0, 0, 0, 586, 1398, + 1399, 1400, 1401, 1402, 0, 1403, 1404, 1405, 0, 0, + 0, 586, 779, 0, 0, 0, 0, 0, 0, 779, + 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, + 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1312, 1425, + 1285, 1426, 0, 1427, 0, 0, 1428, 1429, 1430, 0, + 1453, 1454, 1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, + 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 0, + 7, 8, 9, 10, 0, 11, 12, 13, 198, 68, + 0, 0, 0, 0, 0, 0, 1312, 0, 0, 0, + 0, 248, 249, 250, 251, 252, 0, 253, 254, 255, + 0, 0, 0, 0, 0, 0, 0, 1022, 1023, 1024, + 0, 1026, 0, 1029, 1030, 1031, 1504, 15, 69, 0, + 0, 199, 0, 200, 201, 202, 74, 75, 0, 20, + 76, 0, 0, 203, 22, 0, 0, 78, 0, 0, + 1312, 0, 23, 24, 204, 0, 0, 0, 26, 0, + 0, 205, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 206, 0, 0, + 1521, 0, 0, 0, 0, 44, 0, 45, 0, 46, + 0, 866, 867, 0, 47, 0, 207, 208, 50, 0, + 0, 51, 84, 214, 215, 216, 52, 0, 0, 53, + 85, 86, 87, 209, 0, 0, 89, 0, 210, 0, + 646, 647, 648, 10, 0, 11, 649, 650, 67, 68, + 0, 56, 651, 0, 57, 58, 59, 0, 0, 60, + 0, 61, 62, 0, 0, 63, 0, 0, 0, 1329, + 0, 0, 0, 0, 0, 0, 0, 217, 0, 0, + 0, 0, 0, 0, 460, 0, 0, 652, 69, 218, + 219, 70, 0, 71, 72, 73, 74, 461, 0, 653, + 76, 0, 0, 77, 654, 0, 0, 78, 0, 0, + 0, 0, 655, 656, 79, 0, 0, 0, 0, 0, + 0, 80, 0, 1362, 0, 220, 221, 0, 222, 0, + 0, 0, 0, 223, 0, 224, 0, 81, 0, 0, + 0, 0, 0, 0, 0, 657, 0, 658, 0, 659, + 0, 0, 0, 462, 660, 0, 82, 83, 661, 497, + 0, 662, 84, 1391, 1392, 926, 663, 0, 0, 664, + 85, 86, 87, 88, 1393, 0, 89, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 234, 235, 236, 237, 238, 239, 0, - 925, 217, 218, 0, 1442, 1443, 1444, 1445, 240, 1448, - 1449, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 0, 252, 253, 254, 0, 0, 0, 1287, - 0, 0, 0, 0, 0, 0, 0, 219, 220, 0, - 221, 0, 0, 0, 0, 222, 0, 223, 1099, 1100, - 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 0, - 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, - 1120, 315, 749, 0, 0, 0, 0, 1473, 1121, 1122, - 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1130, 1131, 1132, - 1133, 1134, 1135, 1136, 1137, 1138, 1139, 0, 0, 1140, - 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 1150, - 1151, 1152, 1153, 1154, 0, 1155, 0, 1156, 1157, 1158, - 1159, 1160, 1161, 1162, 1163, 1164, 0, 1165, 1166, 1167, - 245, 246, 247, 248, 249, 250, 251, 0, 252, 253, - 254, 0, 0, 749, 0, 1168, 0, 0, 0, 0, - 0, 1169, 1170, 1171, 0, 1172, 1173, 1174, 1175, 1176, - 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, - 1187, 1188, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, - 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204, 0, 0, - 0, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, - 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, - 1224, 1225, 1414, 1226, 1227, 1099, 1100, 1101, 1102, 1103, - 1104, 1105, 1106, 1107, 1108, 1109, 0, 1110, 1111, 1112, - 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 0, 0, - 0, 0, 0, 0, 0, 1121, 1122, 1123, 1124, 1125, - 1126, 1127, 1128, 1129, 1130, 1131, 1132, 1133, 1134, 1135, - 1136, 1137, 1138, 1139, 0, 0, 1140, 1141, 1142, 1143, - 1144, 1145, 1146, 1147, 1148, 1149, 1150, 1151, 1152, 1153, - 1154, 0, 1155, 0, 1156, 1157, 1158, 1159, 1160, 1161, - 1162, 1163, 1164, 0, 1165, 1166, 1167, 0, 0, 0, + 1297, 665, 0, 0, 666, 667, 0, 0, 0, 668, + 0, 669, 0, 0, 0, 670, 0, 0, 0, 0, + 325, 0, 0, 1100, 1101, 1102, 1103, 1104, 1105, 1106, + 1107, 1108, 1109, 1110, 0, 1111, 1112, 1113, 1114, 1115, + 1116, 1117, 1118, 1119, 1120, 1121, 0, 0, 0, 0, + 0, 0, 1474, 1122, 1123, 1124, 1125, 1126, 1127, 1128, + 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, + 1139, 1140, 0, 0, 1141, 1142, 1143, 1144, 1145, 1146, + 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 0, + 1156, 0, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, + 1165, 0, 1166, 1167, 1168, 0, 0, 0, 1398, 1399, + 1400, 1401, 1402, 0, 1403, 1404, 1405, 0, 0, 0, + 1169, 0, 0, 0, 0, 0, 1170, 1171, 1172, 0, + 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, + 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, + 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, + 1203, 1204, 1205, 0, 0, 0, 1206, 1207, 1208, 1209, + 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, + 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1415, 1227, 1228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1168, 0, 0, 0, 0, 0, 1169, 1170, - 1171, 0, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, - 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, - 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, - 1200, 1201, 1202, 1203, 1204, 0, 0, 0, 1205, 1206, - 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, - 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 0, - 1226, 1227, 7, 8, 9, 10, 0, 11, 12, 13, - 491, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1100, 1101, 1102, 1103, 1104, 1105, 1106, + 1107, 1108, 1109, 1110, 0, 1111, 1112, 1113, 1114, 1115, + 1116, 1117, 1118, 1119, 1120, 1121, 0, 0, 0, 0, + 0, 0, 1382, 1122, 1123, 1124, 1125, 1126, 1127, 1128, + 1129, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, + 1139, 1140, 0, 0, 1141, 1142, 1143, 1144, 1145, 1146, + 1147, 1148, 1149, 1150, 1151, 1152, 1153, 1154, 1155, 0, + 1156, 0, 1157, 1158, 1159, 1160, 1161, 1162, 1163, 1164, + 1165, 0, 1166, 1167, 1168, 0, 0, 0, 0, 0, + 0, 0, 0, 1443, 1444, 1445, 1446, 0, 1449, 1450, + 1169, 0, 0, 0, 0, 0, 1170, 1171, 1172, 0, + 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, + 1183, 1184, 1185, 1186, 1187, 1188, 1189, 1190, 1191, 1192, + 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, + 1203, 1204, 1205, 0, 0, 0, 1206, 1207, 1208, 1209, + 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, + 1220, 1221, 1222, 1223, 1224, 1225, 1226, 0, 1227, 1228, + 7, 8, 9, 10, 0, 11, 12, 13, 492, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 232, 233, 234, 235, 236, 237, - 238, 239, 0, 0, 0, 0, 0, 0, 0, 15, - 336, 240, 0, 199, 0, 200, 201, 202, 74, 0, - 0, 20, 337, 0, 0, 203, 22, 0, 0, 78, - 0, 0, 0, 0, 23, 24, 204, 0, 0, 0, - 26, 0, 0, 205, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 206, - 0, 0, 0, 0, 0, 0, 0, 44, 0, 45, - 0, 46, 0, 0, 0, 0, 47, 0, 207, 208, - 50, 0, 0, 51, 84, 0, 0, 0, 52, 0, - 0, 53, 339, 340, 87, 209, 0, 0, 89, 0, - 210, 7, 8, 9, 10, 0, 11, 12, 13, 14, - 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, - 0, 60, 0, 61, 62, 0, 0, 63, 0, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 0, 252, 253, 254, 0, 0, 0, 1506, 15, 0, - 0, 0, 16, 0, 17, 18, 19, 0, 0, 0, - 20, 0, 734, 735, 21, 22, 0, 0, 0, 0, - 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, - 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, - 0, 0, 0, 0, 0, 0, 44, 0, 45, 0, - 46, 0, 0, 0, 0, 47, 0, 48, 49, 50, - 0, 0, 51, 0, 0, 0, 0, 52, 0, 0, - 53, 0, 0, 0, 54, 7, 8, 9, 10, 55, - 11, 12, 13, 14, 736, 214, 215, 216, 0, 0, - 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, - 60, 0, 61, 62, 0, 0, 63, 1385, 1386, 1387, - 1388, 1389, 1390, 1391, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 1392, 0, 0, 16, 0, 17, 18, - 19, 0, 0, 0, 20, 0, 0, 0, 21, 22, - 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, - 0, 217, 218, 26, 0, 0, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, - 44, 0, 45, 0, 46, 0, 0, 219, 220, 47, - 221, 48, 49, 50, 0, 222, 51, 223, 0, 0, - 0, 52, 0, 0, 53, 0, 0, 0, 54, 7, - 8, 9, 10, 55, 11, 12, 13, 14, 0, 0, - 0, 496, 0, 0, 0, 0, 56, 0, 0, 57, - 58, 59, 0, 0, 60, 0, 61, 62, 432, 0, - 63, 0, 1394, 1395, 1396, 0, 0, 1397, 1398, 1399, - 1400, 1401, 0, 1402, 1403, 1404, 15, 437, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, + 0, 0, 0, 0, 0, 0, 0, 15, 337, 241, + 0, 199, 0, 200, 201, 202, 74, 0, 0, 20, + 338, 0, 0, 203, 22, 0, 0, 78, 0, 0, + 0, 0, 23, 24, 204, 0, 0, 0, 26, 0, + 0, 205, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 206, 0, 0, + 0, 0, 0, 0, 0, 44, 0, 45, 0, 46, + 0, 0, 0, 0, 47, 0, 207, 208, 50, 0, + 0, 51, 84, 0, 0, 0, 52, 0, 0, 53, + 340, 341, 87, 209, 0, 0, 89, 0, 210, 7, + 8, 9, 10, 0, 11, 12, 13, 14, 0, 0, + 0, 56, 0, 0, 57, 58, 59, 0, 0, 60, + 0, 61, 62, 0, 0, 63, 0, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 0, 253, + 254, 255, 0, 0, 0, 590, 15, 0, 0, 0, 16, 0, 17, 18, 19, 0, 0, 0, 20, 0, - 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, + 735, 736, 21, 22, 214, 215, 216, 0, 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 44, 0, 45, 0, 46, 0, - 0, 0, 0, 47, 0, 48, 49, 50, 0, 0, + 0, 0, 0, 47, 0, 48, 49, 50, 217, 0, 51, 0, 0, 0, 0, 52, 0, 0, 53, 0, - 0, 0, 54, 7, 8, 9, 10, 55, 11, 12, - 13, 14, 0, 214, 215, 216, 0, 0, 879, 0, + 218, 219, 54, 7, 8, 9, 10, 55, 11, 12, + 13, 14, 737, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, 60, 0, - 61, 62, 0, 0, 63, 0, 0, 0, 232, 233, - 234, 235, 236, 237, 238, 239, 0, 0, 0, 0, - 15, 712, 0, 0, 16, 240, 17, 18, 19, 0, - 0, 0, 20, 0, 0, 0, 21, 22, 0, 0, - 0, 0, 0, 0, 0, 23, 24, 25, 0, 217, - 218, 26, 0, 0, 27, 28, 29, 30, 31, 32, + 61, 62, 0, 0, 63, 0, 220, 221, 0, 222, + 0, 0, 0, 0, 223, 0, 224, 0, 0, 0, + 15, 0, 0, 0, 16, 0, 17, 18, 19, 0, + 0, 0, 20, 0, 0, 0, 21, 22, 479, 480, + 481, 0, 0, 0, 0, 23, 24, 25, 582, 0, + 0, 26, 0, 227, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 44, 0, - 45, 0, 46, 0, 0, 219, 220, 47, 221, 48, - 49, 50, 0, 222, 51, 223, 0, 0, 0, 52, - 0, 0, 53, 0, 0, 0, 54, 7, 8, 9, - 10, 55, 11, 12, 13, 14, 0, 214, 215, 216, + 45, 0, 46, 0, 0, 0, 0, 47, 0, 48, + 49, 50, 217, 0, 51, 0, 0, 0, 0, 52, + 0, 0, 53, 0, 218, 219, 54, 7, 8, 9, + 10, 55, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, - 0, 0, 60, 0, 61, 62, 0, 0, 63, 0, - 0, 587, 0, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 15, 252, 253, 254, 16, 0, + 0, 0, 60, 0, 61, 62, 433, 0, 63, 0, + 484, 221, 0, 222, 0, 0, 0, 0, 223, 0, + 224, 0, 0, 0, 15, 438, 0, 0, 16, 0, 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, - 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, - 24, 25, 0, 217, 218, 26, 0, 0, 27, 28, + 21, 22, 0, 0, 0, 0, 0, 288, 0, 23, + 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, 0, 0, 0, 0, - 0, 0, 44, 0, 45, 0, 46, 0, 0, 219, - 220, 47, 221, 48, 49, 50, 0, 222, 51, 223, + 0, 0, 44, 0, 45, 0, 46, 0, 0, 0, + 0, 47, 0, 48, 49, 50, 0, 0, 51, 0, 0, 0, 0, 52, 0, 0, 53, 0, 0, 0, 54, 7, 8, 9, 10, 55, 11, 12, 13, 14, - 922, 0, 0, 0, 0, 0, 0, 0, 56, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, 60, 0, 61, 62, - 0, 0, 63, 0, 0, 0, 232, 233, 234, 235, - 236, 237, 238, 239, 0, 0, 0, 0, 15, 0, - 0, 0, 16, 240, 17, 18, 19, 0, 0, 0, + 0, 0, 63, 0, 0, 0, 233, 234, 235, 236, + 237, 238, 239, 240, 0, 0, 0, 0, 15, 713, + 0, 0, 16, 241, 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, @@ -1812,9 +1768,9 @@ static const yytype_int16 yytable[] = 53, 0, 0, 0, 54, 7, 8, 9, 10, 55, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, - 60, 0, 61, 62, 1057, 0, 63, 0, 927, 0, - 0, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 15, 252, 253, 254, 16, 0, 17, 18, + 60, 0, 61, 62, 0, 0, 63, 0, 0, 588, + 0, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 15, 253, 254, 255, 16, 0, 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, @@ -1823,12 +1779,12 @@ static const yytype_int16 yytable[] = 44, 0, 45, 0, 46, 0, 0, 0, 0, 47, 0, 48, 49, 50, 0, 0, 51, 0, 0, 0, 0, 52, 0, 0, 53, 0, 0, 0, 54, 7, - 8, 9, 10, 55, 11, 12, 13, 14, 1327, 0, + 8, 9, 10, 55, 11, 12, 13, 14, 923, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, 60, 0, 61, 62, 0, 0, - 63, 0, 0, 0, 232, 233, 234, 235, 236, 237, - 238, 239, 0, 0, 0, 0, 15, 0, 0, 0, - 16, 240, 17, 18, 19, 0, 0, 0, 20, 0, + 63, 0, 0, 0, 233, 234, 235, 236, 237, 238, + 239, 240, 0, 0, 0, 0, 15, 0, 0, 0, + 16, 241, 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -1839,9 +1795,9 @@ static const yytype_int16 yytable[] = 0, 0, 54, 7, 8, 9, 10, 55, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, 60, 0, - 61, 62, 1471, 0, 63, 1262, 0, 0, 0, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 15, 252, 253, 254, 16, 0, 17, 18, 19, 0, + 61, 62, 1058, 0, 63, 0, 928, 0, 0, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 15, 253, 254, 255, 16, 0, 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, 29, 30, 31, 32, @@ -1849,309 +1805,358 @@ static const yytype_int16 yytable[] = 43, 0, 0, 0, 0, 0, 0, 0, 44, 0, 45, 0, 46, 0, 0, 0, 0, 47, 0, 48, 49, 50, 0, 0, 51, 0, 0, 0, 0, 52, - 0, 0, 53, 0, 0, 0, 54, 645, 646, 647, - 10, 55, 11, 648, 649, 67, 68, 0, 0, 650, + 0, 0, 53, 0, 0, 0, 54, 7, 8, 9, + 10, 55, 11, 12, 13, 14, 1328, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 57, 58, 59, - 0, 0, 60, 0, 61, 62, 0, 0, 63, 232, - 233, 234, 235, 236, 237, 238, 239, 0, 0, 0, - 0, 459, 0, 0, 651, 69, 240, 0, 70, 0, - 71, 72, 73, 74, 460, 0, 652, 76, 0, 0, - 77, 653, 0, 0, 78, 0, 0, 0, 0, 654, - 655, 79, 0, 0, 0, 0, 0, 0, 80, 0, - 0, 0, 0, 0, 232, 233, 234, 235, 236, 237, - 238, 239, 0, 0, 81, 0, 0, 0, 0, 0, - 0, 240, 656, 0, 657, 0, 658, 0, 0, 0, - 461, 659, 0, 82, 83, 660, 0, 0, 661, 84, - 0, 0, 0, 662, 0, 0, 663, 85, 86, 87, - 88, 0, 0, 89, 0, 90, 0, 645, 646, 647, - 10, 0, 11, 648, 649, 67, 68, 0, 664, 1034, - 0, 665, 666, 0, 0, 0, 667, 0, 668, 0, - 688, 0, 669, 0, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 0, 252, 253, 254, 689, - 0, 459, 0, 0, 651, 69, 0, 0, 70, 0, - 71, 72, 73, 74, 460, 0, 652, 76, 0, 0, - 77, 653, 0, 0, 78, 214, 215, 216, 0, 654, - 655, 79, 0, 0, 0, 0, 0, 1285, 80, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 0, 252, 253, 254, 81, 0, 0, 0, 0, 0, - 0, 0, 656, 0, 657, 0, 658, 0, 0, 0, - 461, 659, 0, 82, 83, 660, 0, 0, 661, 84, - 0, 0, 0, 662, 0, 0, 663, 85, 86, 87, - 88, 217, 218, 89, 0, 90, 7, 8, 9, 10, - 0, 11, 12, 13, 0, 0, 0, 0, 664, 0, - 0, 665, 666, 0, 0, 0, 667, 0, 668, 0, - 0, 0, 669, 0, 0, 0, 0, 219, 1263, 1264, - 1265, 0, 0, 0, 0, 222, 0, 223, 0, 0, - 0, 0, 0, 1297, 0, 0, 0, 0, 1266, 0, - 0, 0, 0, 1267, 0, 1298, 0, 0, 0, 0, - 1299, 234, 235, 236, 237, 238, 239, 0, 23, 24, - 0, 0, 0, 0, 26, 0, 240, 0, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 0, 232, 233, 234, 235, 236, 237, - 238, 239, 0, 45, 0, 46, 0, 0, 0, 0, - 1300, 240, 0, 0, 1301, 0, 0, 1302, 0, 0, - 0, 0, 52, 0, 0, 0, 0, 0, 0, 70, - 0, 71, 72, 73, 0, 0, 0, 0, 0, 0, - 0, 262, 0, 0, 0, 0, 0, 1303, 0, 0, - 1304, 1305, 1306, 931, 0, 1307, 0, 1308, 62, 80, - 0, 1309, 0, 932, 933, 934, 935, 936, 937, 938, - 939, 0, 0, 0, 0, 263, 0, 0, 0, 0, - 940, 0, 941, 942, 943, 944, 945, 946, 947, 948, - 949, 950, 951, 952, 82, 83, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 0, 252, 253, 254, 0, - 0, 88, 953, 0, 0, 0, 90, 0, 0, 214, - 215, 216, 0, 0, 334, 335, 0, 0, 0, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 0, 252, 253, 254, 575, 1384, 1385, 1386, 1387, 1388, - 1389, 1390, 1391, 0, 0, 954, 0, 0, 0, 0, - 0, 0, 1392, 0, 0, 336, 0, 0, 70, 0, - 71, 72, 73, 74, 0, 0, 0, 337, 0, 0, - 77, 0, 0, 0, 78, 217, 218, 0, 0, 0, - 0, 79, 0, 0, 955, 0, 0, 956, 80, 957, - 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, - 0, 968, 969, 0, 81, 970, 0, 334, 335, 0, - 0, 219, 220, 0, 221, 338, 0, 0, 0, 222, - 0, 223, 0, 82, 83, 0, 0, 0, 0, 84, - 0, 0, 0, 0, 0, 0, 291, 339, 340, 87, - 88, 0, 0, 89, 0, 90, 0, 0, 336, 0, - 341, 70, 0, 71, 72, 73, 74, 0, 0, 0, - 337, 0, 0, 77, 0, 0, 342, 78, 1504, 765, - 1393, 1394, 1395, 1396, 79, 0, 1397, 1398, 1399, 1400, - 1401, 80, 1402, 1403, 1404, 766, 0, 0, 214, 215, - 216, 0, 0, 506, 507, 0, 0, 81, 0, 767, - 0, 0, 0, 0, 0, 0, 0, 0, 338, 0, - 0, 0, 768, 769, 0, 0, 82, 83, 0, 0, - 0, 0, 84, 0, 0, 0, 0, 0, 770, 0, - 339, 340, 87, 88, 336, 0, 89, 70, 90, 71, - 72, 73, 74, 0, 0, 0, 337, 0, 0, 77, - 0, 0, 0, 78, 217, 218, 0, 0, 771, 342, - 79, 772, 0, 0, 773, 0, 0, 80, 232, 233, - 234, 235, 236, 237, 238, 239, 0, 0, 0, 0, - 774, 0, 0, 81, 0, 240, 0, 0, 0, 0, - 219, 220, 775, 221, 338, 0, 0, 0, 222, 0, - 223, 0, 82, 83, 0, 0, 776, 0, 84, 0, - 70, 1266, 71, 72, 73, 0, 339, 340, 87, 88, - 0, 0, 89, 0, 90, 232, 233, 234, 235, 236, - 237, 238, 239, 0, 0, 0, 0, 0, 0, 0, - 80, 0, 240, 0, 0, 342, 232, 233, 234, 235, - 236, 237, 238, 239, 0, 0, 263, 0, 0, 0, - 0, 0, 0, 240, 232, 233, 234, 235, 236, 237, - 238, 239, 0, 0, 0, 82, 83, 0, 0, 0, - 0, 240, 232, 233, 234, 235, 236, 237, 238, 239, - 0, 0, 88, 0, 0, 0, 0, 90, 0, 240, - 0, 0, 0, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 0, 252, 253, 254, 591, 232, - 233, 234, 235, 236, 237, 238, 239, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 240, 232, 233, 234, - 235, 236, 237, 238, 239, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 0, 252, 253, 254, 679, 0, 0, 0, 0, - 0, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 0, 252, 253, 254, 757, 0, 0, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 0, 252, 253, 254, 898, 0, 0, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 0, 252, - 253, 254, 1015, 842, 843, 844, 845, 846, 847, 848, - 849, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 850, 0, 0, 0, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 0, 252, 253, 254, 1283, - 0, 0, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 0, 252, 253, 254, 1384, 1385, 1386, - 1387, 1388, 1389, 1390, 1391, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1392, 0, 0, 0, 0, 0, + 0, 0, 60, 0, 61, 62, 0, 0, 63, 0, + 0, 0, 233, 234, 235, 236, 237, 238, 239, 240, + 0, 0, 0, 0, 15, 0, 0, 0, 16, 241, + 17, 18, 19, 0, 0, 0, 20, 0, 0, 0, + 21, 22, 0, 0, 0, 0, 0, 0, 0, 23, + 24, 25, 0, 0, 0, 26, 0, 0, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + 39, 40, 41, 42, 43, 0, 0, 0, 0, 0, + 0, 0, 44, 0, 45, 0, 46, 0, 0, 0, + 0, 47, 0, 48, 49, 50, 0, 0, 51, 0, + 0, 0, 0, 52, 0, 0, 53, 0, 0, 0, + 54, 7, 8, 9, 10, 55, 11, 12, 13, 14, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, + 0, 57, 58, 59, 0, 0, 60, 0, 61, 62, + 1472, 0, 63, 1263, 0, 0, 0, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 15, 253, + 254, 255, 16, 0, 17, 18, 19, 0, 0, 0, + 20, 0, 0, 0, 21, 22, 0, 0, 0, 0, + 0, 0, 0, 23, 24, 25, 0, 0, 0, 26, + 0, 0, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, + 0, 0, 0, 0, 0, 0, 44, 0, 45, 0, + 46, 0, 0, 0, 0, 47, 0, 48, 49, 50, + 0, 0, 51, 0, 0, 0, 0, 52, 0, 0, + 53, 0, 0, 0, 54, 646, 647, 648, 10, 55, + 11, 649, 650, 67, 68, 0, 0, 1035, 0, 0, + 0, 0, 56, 0, 0, 57, 58, 59, 0, 0, + 60, 0, 61, 62, 0, 0, 63, 233, 234, 235, + 236, 237, 238, 239, 240, 0, 0, 0, 0, 460, + 0, 0, 652, 69, 241, 0, 70, 0, 71, 72, + 73, 74, 461, 0, 653, 76, 0, 0, 77, 654, + 0, 0, 78, 0, 0, 0, 0, 655, 656, 79, + 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 234, 235, 236, 237, 238, 239, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 240, 851, 852, - 853, 854, 855, 856, 857, 858, 859, 860, 861, 0, - 862, 863, 864, 105, 0, 106, 0, 0, 107, 108, + 0, 0, 81, 0, 0, 0, 0, 0, 0, 0, + 657, 0, 658, 0, 659, 0, 0, 0, 462, 660, + 0, 82, 83, 661, 0, 0, 662, 84, 0, 0, + 0, 663, 0, 0, 664, 85, 86, 87, 88, 0, + 0, 89, 0, 90, 7, 8, 9, 10, 0, 11, + 12, 13, 0, 0, 0, 0, 665, 0, 0, 666, + 667, 0, 0, 0, 668, 0, 669, 0, 0, 0, + 670, 0, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 0, 253, 254, 255, 0, 0, 0, + 1288, 1298, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1299, 0, 0, 0, 0, 1300, 234, + 235, 236, 237, 238, 239, 240, 23, 24, 0, 0, + 0, 0, 26, 0, 0, 241, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 0, 233, 234, 235, 236, 237, 238, 239, 240, + 0, 45, 0, 46, 0, 0, 0, 0, 1301, 241, + 0, 0, 1302, 0, 0, 1303, 0, 0, 0, 0, + 52, 0, 0, 0, 0, 0, 0, 70, 0, 71, + 72, 73, 0, 0, 0, 0, 0, 0, 0, 263, + 0, 0, 0, 0, 0, 1304, 0, 0, 1305, 1306, + 1307, 932, 0, 1308, 0, 1309, 62, 80, 0, 1310, + 0, 933, 934, 935, 936, 937, 938, 939, 940, 0, + 0, 0, 0, 264, 0, 0, 0, 0, 941, 0, + 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, + 952, 953, 82, 83, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 0, 253, 254, 255, 0, 88, + 954, 0, 0, 0, 90, 0, 0, 0, 0, 0, + 0, 0, 335, 336, 0, 0, 0, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 0, 253, + 254, 255, 0, 0, 0, 1507, 0, 1389, 1390, 1391, + 1392, 0, 0, 955, 0, 0, 0, 0, 0, 0, + 1393, 0, 0, 337, 0, 0, 70, 0, 71, 72, + 73, 74, 0, 0, 0, 338, 0, 0, 77, 0, + 0, 0, 78, 0, 0, 0, 0, 0, 0, 79, + 0, 0, 956, 0, 0, 957, 80, 958, 959, 960, + 961, 962, 963, 964, 965, 966, 967, 968, 0, 969, + 970, 0, 81, 971, 0, 335, 336, 0, 0, 0, + 0, 0, 0, 339, 0, 0, 0, 0, 0, 0, + 0, 82, 83, 0, 0, 0, 0, 84, 0, 0, + 0, 0, 0, 0, 0, 340, 341, 87, 88, 0, + 0, 89, 0, 90, 0, 0, 337, 0, 342, 70, + 0, 71, 72, 73, 74, 0, 0, 0, 338, 0, + 0, 77, 0, 0, 343, 78, 0, 0, 0, 0, + 0, 0, 79, 0, 1398, 1399, 1400, 1401, 1402, 80, + 1403, 1404, 1405, 0, 0, 0, 0, 0, 0, 0, + 0, 507, 508, 0, 0, 81, 0, 70, 0, 71, + 72, 73, 0, 0, 0, 0, 339, 0, 0, 263, + 0, 0, 0, 0, 82, 83, 0, 0, 0, 0, + 84, 0, 0, 0, 0, 0, 0, 80, 340, 341, + 87, 88, 337, 0, 89, 70, 90, 71, 72, 73, + 74, 0, 0, 264, 338, 0, 0, 77, 0, 0, + 0, 78, 0, 0, 0, 0, 0, 343, 79, 0, + 0, 0, 82, 83, 0, 80, 233, 234, 235, 236, + 237, 238, 239, 240, 0, 0, 0, 0, 0, 88, + 0, 81, 0, 241, 90, 0, 0, 0, 0, 0, + 0, 70, 339, 71, 72, 73, 0, 0, 0, 0, + 82, 83, 0, 0, 0, 0, 84, 174, 0, 0, + 0, 0, 0, 0, 340, 341, 87, 88, 0, 0, + 89, 80, 90, 233, 234, 235, 236, 237, 238, 239, + 240, 0, 0, 0, 0, 0, 0, 264, 0, 0, + 241, 0, 0, 343, 233, 234, 235, 236, 237, 238, + 239, 240, 0, 0, 0, 0, 82, 83, 0, 0, + 0, 241, 233, 234, 235, 236, 237, 238, 239, 240, + 0, 0, 0, 88, 0, 0, 0, 0, 90, 241, + 0, 233, 234, 235, 236, 237, 238, 239, 240, 0, + 0, 0, 0, 0, 0, 0, 0, 689, 241, 0, + 0, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 0, 253, 254, 255, 690, 233, 234, 235, + 236, 237, 238, 239, 240, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 241, 233, 234, 235, 236, 237, + 238, 239, 240, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 241, 0, 0, 0, 0, 0, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 0, + 253, 254, 255, 576, 0, 0, 0, 0, 0, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 0, 253, 254, 255, 592, 0, 0, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 0, 253, + 254, 255, 680, 0, 0, 0, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 0, 253, 254, + 255, 758, 233, 234, 235, 236, 237, 238, 239, 240, + 0, 0, 0, 0, 0, 0, 214, 215, 216, 241, + 0, 880, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 0, 253, 254, 255, 899, 0, 0, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 0, 253, 254, 255, 1016, 233, 234, 235, 236, + 237, 238, 239, 240, 0, 0, 479, 480, 481, 0, + 217, 0, 0, 241, 233, 234, 235, 236, 237, 238, + 239, 240, 218, 219, 0, 0, 0, 0, 0, 0, + 0, 241, 843, 844, 845, 846, 847, 848, 849, 850, + 0, 0, 0, 482, 0, 483, 0, 0, 0, 851, + 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 220, 221, + 217, 222, 0, 0, 0, 0, 223, 1393, 224, 0, + 0, 0, 218, 219, 0, 0, 0, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 0, 253, + 254, 255, 1284, 1385, 1386, 1387, 1388, 1389, 1390, 1391, + 1392, 0, 0, 0, 0, 0, 0, 0, 484, 221, + 1393, 222, 0, 0, 0, 0, 223, 0, 224, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1286, + 0, 242, 243, 244, 245, 246, 247, 248, 249, 250, + 251, 252, 485, 253, 254, 255, 0, 0, 0, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 0, 253, 254, 255, 0, 0, 0, 852, 853, 854, + 855, 856, 857, 858, 859, 860, 861, 862, 0, 863, + 864, 865, 0, 1505, 0, 1394, 1395, 1396, 1397, 0, + 0, 1398, 1399, 1400, 1401, 1402, -2, 1403, 1404, 1405, + 0, 0, 0, 0, 0, 1386, 1387, 1388, 1389, 1390, + 1391, 1392, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1393, 0, 0, 0, 0, 0, 0, 1394, 1395, + 1396, 1397, 0, 0, 1398, 1399, 1400, 1401, 1402, 0, + 1403, 1404, 1405, 105, 0, 106, 0, 0, 107, 108, 0, 0, 0, 0, 0, 0, 109, 110, 0, 0, 0, 0, 0, 0, 0, 111, 0, 112, 113, 114, 115, 0, 0, 0, 116, 0, 0, 0, 0, 117, - 0, 0, 1393, 1394, 1395, 1396, 0, 0, 1397, 1398, - 1399, 1400, 1401, 0, 1402, 1403, 1404, 0, 118, 119, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 118, 119, 120, 121, 122, 123, 0, 0, 0, 0, 0, 124, 125, 126, 127, 0, 0, 0, 0, 0, 128, 129, - 67, 68, 130, 131, 457, 0, 458, 132, 0, 0, + 67, 68, 130, 131, 458, 0, 459, 132, 0, 0, 0, 0, 0, 133, 134, 0, 135, 0, 0, 0, - 0, 0, 0, 0, 136, 0, 0, 0, 244, 245, - 246, 247, 248, 249, 250, 251, 459, 252, 253, 254, - 69, 0, 0, 70, 0, 71, 72, 73, 74, 460, + 1395, 1396, 1397, 0, 136, 1398, 1399, 1400, 1401, 1402, + 0, 1403, 1404, 1405, 0, 0, 460, 0, 0, 0, + 69, 0, 0, 70, 0, 71, 72, 73, 74, 461, 0, 0, 76, 0, 0, 77, 0, 0, 0, 78, - 1386, 1387, 1388, 1389, 1390, 1391, 79, 0, 0, 214, - 215, 216, 0, 80, 0, 1392, 1386, 1387, 1388, 1389, - 1390, 1391, 0, 0, 0, 0, 0, 0, 0, 81, - 0, 1392, 1386, 1387, 1388, 1389, 1390, 1391, 0, 0, - 0, 0, 0, 0, 0, 461, 0, 1392, 82, 83, - 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, - 0, 0, 85, 86, 87, 88, 0, 0, 89, 0, - 90, 0, 0, 0, 0, 217, 218, 0, 0, 0, - 0, 0, 0, 462, 0, 0, 0, 0, 463, 0, + 235, 236, 237, 238, 239, 240, 79, 0, 0, 0, + 0, 0, 0, 80, 0, 241, 235, 236, 237, 238, + 239, 240, 0, 0, 0, 0, 0, 0, 0, 81, + 0, 241, 235, 236, 237, 238, 239, 240, 0, 0, + 0, 0, 0, 0, 0, 462, 0, 241, 82, 83, + 0, 0, 0, 0, 84, 0, 1387, 1388, 1389, 1390, + 1391, 1392, 85, 86, 87, 88, 0, 0, 89, 0, + 90, 1393, 235, 236, 237, 238, 239, 240, 0, 0, + 0, 0, 0, 463, 0, 0, 0, 241, 464, 1387, + 1388, 1389, 1390, 1391, 1392, 0, 0, 0, 1387, 1388, + 1389, 1390, 1391, 1392, 1393, 0, 0, 0, 0, 0, + 0, 0, 0, 1393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 243, 244, 245, 246, 247, 248, + 249, 250, 251, 252, 0, 253, 254, 255, 0, 0, + 0, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 0, 253, 254, 255, 0, 0, 0, 0, 245, 246, + 247, 248, 249, 250, 251, 252, 0, 253, 254, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 219, 220, 0, 221, 0, 0, 0, 0, 222, - 0, 223, 0, 0, 0, 0, 0, 478, 479, 480, - 0, 0, 1266, 0, 1394, 1395, 1396, 1342, 0, 1397, - 1398, 1399, 1400, 1401, 302, 1402, 1403, 1404, 0, 0, - 0, 1395, 1396, 0, 0, 1397, 1398, 1399, 1400, 1401, - 175, 1402, 1403, 1404, 481, 0, 482, 0, 1396, 0, - 0, 1397, 1398, 1399, 1400, 1401, 0, 1402, 1403, 1404, - 0, 302, 0, 0, 0, 105, 0, 106, 0, 0, - 0, 108, 0, 217, 218, 0, 0, 0, 109, 110, - 176, 0, 0, 70, 0, 71, 72, 73, 74, 112, - 113, 114, 177, 0, 0, 77, 0, 0, 0, 78, - 0, 297, 105, 0, 106, 0, 79, 0, 108, 483, - 220, 0, 221, 80, 0, 109, 110, 222, 0, 223, - 0, 0, 0, 0, 122, 0, 112, 296, 114, 81, - 0, 0, 0, 0, 127, 0, 0, 0, 297, 0, - 128, 0, 0, 484, 130, 131, 0, 0, 82, 83, - 394, 67, 68, 0, 84, 0, 134, 0, 135, 0, - 0, 122, 178, 179, 87, 88, 0, 0, 89, 0, - 90, 127, 0, 0, 0, 0, 0, 128, 0, 1027, - 67, 68, 131, 0, 0, 0, 0, 0, 0, 0, - 0, 69, 0, 134, 70, 135, 71, 72, 73, 74, - 75, 0, 0, 76, 0, 0, 77, 0, 0, 0, - 78, 0, 0, 0, 0, 0, 0, 79, 0, 0, - 69, 0, 0, 70, 80, 71, 72, 73, 74, 75, - 0, 0, 76, 0, 0, 77, 0, 0, 0, 78, - 81, 0, 0, 0, 0, 0, 79, 70, 0, 71, - 72, 73, 0, 80, 0, 0, 0, 0, 0, 82, - 83, 0, 0, 0, 0, 84, 0, 0, 0, 81, - 1447, 67, 68, 85, 86, 87, 88, 80, 0, 89, - 0, 90, 0, 0, 0, 0, 0, 0, 82, 83, - 0, 0, 0, 263, 84, 0, 0, 0, 0, 690, - 691, 692, 85, 86, 87, 88, 0, 0, 89, 0, - 90, 69, 82, 83, 70, 0, 71, 72, 73, 74, - 75, 0, 0, 76, 0, 0, 77, 0, 0, 88, - 78, 0, 0, 0, 90, 0, 0, 79, 0, 0, - 0, 0, 0, 70, 80, 71, 72, 73, 693, 694, - 0, 0, 0, 0, 0, 77, 0, 185, 0, 0, - 81, 0, 0, 0, 0, 0, 79, 690, 691, 692, - 0, 0, 0, 80, 0, 0, 0, 0, 0, 82, - 83, 0, 0, 0, 0, 84, 0, 0, 0, 81, - 0, 0, 0, 85, 86, 87, 88, 0, 0, 89, - 0, 90, 0, 0, 0, 0, 67, 68, 82, 83, - 457, 70, 0, 71, 72, 73, 0, 0, 0, 0, - 0, 0, 695, 77, 0, 88, 0, 0, 89, 0, - 90, 0, 0, 0, 79, 67, 68, 0, 0, 791, - 0, 80, 459, 0, 0, 0, 69, 0, 0, 70, - 0, 71, 72, 73, 74, 460, 0, 81, 76, 0, - 0, 77, 0, 0, 0, 78, 0, 0, 0, 0, - 0, 459, 79, 0, 0, 69, 82, 83, 70, 80, - 71, 72, 73, 74, 460, 0, 0, 76, 0, 0, - 77, 0, 0, 88, 78, 81, 89, 0, 90, 0, - 0, 79, 0, 0, 0, 0, 0, 0, 80, 0, - 0, 461, 0, 0, 82, 83, 0, 0, 0, 0, - 84, 0, 0, 0, 81, 0, 67, 68, 85, 86, - 87, 88, 0, 0, 89, 0, 90, 0, 0, 0, - 461, 0, 0, 82, 83, 0, 0, 0, 0, 84, - 214, 215, 216, 0, 0, 67, 68, 85, 86, 87, - 88, 0, 459, 89, 0, 90, 69, 0, 0, 70, - 0, 71, 72, 73, 74, 460, 0, 0, 76, 0, - 0, 77, 0, 0, 0, 78, 0, 481, 0, 482, - 0, 0, 79, 0, 0, 69, 0, 0, 70, 80, + 1395, 1396, 1397, 0, 0, 1398, 1399, 1400, 1401, 1402, + 0, 1403, 1404, 1405, 0, 303, 0, 0, 303, 246, + 247, 248, 249, 250, 251, 252, 0, 253, 254, 255, + 0, 0, 0, 0, 0, 1397, 0, 0, 1398, 1399, + 1400, 1401, 1402, 0, 1403, 1404, 1405, 1398, 1399, 1400, + 1401, 1402, 0, 1403, 1404, 1405, 105, 0, 106, 105, + 0, 106, 108, 0, 0, 108, 0, 0, 0, 109, + 110, 0, 109, 110, 0, 214, 215, 216, 0, 0, + 112, 113, 114, 112, 297, 114, 0, 0, 0, 0, + 0, 0, 298, 0, 0, 298, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 395, 67, 68, + 0, 0, 0, 0, 0, 122, 0, 0, 122, 0, + 0, 0, 0, 0, 0, 127, 0, 0, 127, 217, + 0, 128, 0, 0, 128, 130, 131, 0, 0, 131, + 0, 218, 219, 0, 0, 0, 0, 134, 69, 135, + 134, 70, 135, 71, 72, 73, 74, 75, 0, 0, + 76, 0, 0, 77, 0, 0, 0, 78, 0, 0, + 0, 0, 0, 0, 79, 0, 0, 220, 1264, 1265, + 1266, 80, 0, 0, 0, 223, 0, 224, 0, 0, + 0, 0, 0, 1028, 67, 68, 0, 81, 1267, 0, + 0, 0, 0, 1268, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 82, 83, 0, 0, + 0, 0, 84, 0, 1448, 67, 68, 0, 0, 0, + 85, 86, 87, 88, 69, 0, 89, 70, 90, 71, + 72, 73, 74, 75, 0, 0, 76, 0, 0, 77, + 0, 0, 0, 78, 0, 0, 0, 0, 0, 0, + 79, 0, 0, 0, 0, 69, 0, 80, 70, 0, 71, 72, 73, 74, 75, 0, 0, 76, 0, 0, - 77, 0, 0, 0, 78, 81, 217, 218, 0, 0, - 0, 79, 0, 0, 214, 215, 216, 0, 80, 0, - 0, 461, 0, 0, 82, 83, 0, 0, 0, 0, - 84, 67, 68, 0, 81, 0, 0, 0, 85, 86, - 87, 88, 219, 220, 89, 221, 90, 0, 0, 0, - 222, 0, 223, 82, 83, 67, 68, 0, 0, 84, + 77, 0, 0, 81, 78, 0, 0, 0, 0, 0, + 0, 79, 0, 0, 0, 0, 0, 0, 80, 0, + 0, 0, 82, 83, 0, 0, 0, 0, 84, 0, + 691, 692, 693, 0, 81, 0, 85, 86, 87, 88, + 0, 0, 89, 0, 90, 691, 692, 693, 0, 0, + 0, 0, 0, 82, 83, 0, 0, 0, 0, 84, + 70, 0, 71, 72, 73, 0, 0, 85, 86, 87, + 88, 0, 0, 89, 70, 90, 71, 72, 73, 694, + 695, 0, 0, 214, 215, 216, 77, 0, 0, 70, + 80, 71, 72, 73, 0, 0, 0, 79, 0, 0, + 0, 77, 0, 0, 80, 0, 264, 0, 0, 0, + 0, 0, 79, 0, 0, 0, 0, 0, 0, 80, + 81, 0, 0, 0, 0, 82, 83, 0, 0, 0, + 0, 0, 67, 68, 0, 81, 458, 217, 0, 82, + 83, 0, 88, 0, 0, 0, 0, 90, 0, 218, + 219, 0, 0, 696, 82, 83, 88, 0, 0, 89, + 0, 90, 0, 67, 68, 0, 0, 792, 460, 0, + 185, 88, 69, 0, 89, 70, 90, 71, 72, 73, + 74, 461, 0, 0, 76, 220, 221, 77, 222, 0, + 0, 78, 0, 223, 0, 224, 0, 0, 79, 460, + 0, 0, 0, 69, 0, 80, 70, 0, 71, 72, + 73, 74, 461, 0, 0, 76, 0, 0, 77, 0, + 0, 81, 78, 0, 0, 0, 0, 0, 0, 79, + 0, 0, 0, 0, 0, 0, 80, 462, 0, 0, + 82, 83, 0, 0, 0, 0, 84, 0, 214, 215, + 216, 0, 81, 0, 85, 86, 87, 88, 67, 68, + 89, 0, 90, 0, 0, 0, 0, 0, 462, 0, + 0, 82, 83, 0, 0, 0, 0, 84, 0, 0, + 0, 0, 0, 0, 0, 85, 86, 87, 88, 67, + 68, 89, 0, 90, 460, 0, 0, 0, 69, 0, + 0, 70, 217, 71, 72, 73, 74, 461, 0, 0, + 76, 0, 0, 77, 218, 219, 0, 78, 0, 70, + 0, 71, 72, 73, 79, 0, 0, 0, 0, 69, + 0, 80, 70, 0, 71, 72, 73, 74, 75, 0, + 0, 76, 0, 0, 77, 0, 0, 81, 78, 80, + 220, 221, 0, 222, 0, 79, 0, 0, 223, 0, + 224, 0, 80, 462, 0, 264, 82, 83, 0, 0, + 0, 1267, 84, 0, 0, 67, 68, 0, 81, 0, + 85, 86, 87, 88, 82, 83, 89, 0, 90, 0, + 0, 0, 0, 0, 0, 0, 0, 82, 83, 67, + 68, 88, 0, 84, 0, 0, 90, 214, 215, 216, + 0, 85, 86, 87, 88, 69, 0, 89, 70, 90, + 71, 72, 73, 74, 0, 0, 0, 76, 0, 186, + 77, 0, 0, 0, 78, 0, 0, 0, 0, 69, + 0, 79, 70, 0, 71, 72, 73, 74, 80, 0, + 0, 76, 0, 0, 77, 0, 0, 0, 78, 0, + 0, 217, 0, 0, 81, 79, 0, 0, 0, 0, + 0, 0, 80, 218, 219, 0, 0, 0, 0, 0, + 605, 0, 0, 82, 83, 67, 0, 0, 81, 84, 0, 0, 0, 0, 0, 0, 0, 85, 86, 87, - 88, 69, 0, 89, 70, 90, 71, 72, 73, 74, - 217, 218, 0, 76, 0, 70, 77, 71, 72, 73, - 78, 0, 0, 0, 0, 69, 0, 79, 70, 0, - 71, 72, 73, 74, 80, 0, 0, 76, 0, 0, - 77, 0, 0, 0, 78, 80, 219, 220, 0, 221, - 81, 79, 0, 0, 222, 0, 223, 0, 80, 0, - 0, 263, 0, 0, 0, 0, 604, 1266, 0, 82, - 83, 67, 1344, 0, 81, 84, 0, 0, 0, 0, - 82, 83, 0, 85, 86, 87, 88, 0, 0, 89, - 0, 90, 0, 82, 83, 0, 0, 88, 0, 84, - 175, 0, 90, 0, 0, 0, 0, 85, 86, 87, - 88, 69, 0, 89, 70, 90, 71, 72, 73, 74, - 517, 0, 0, 76, 0, 186, 77, 0, 0, 0, - 78, 0, 0, 0, 0, 0, 0, 79, 0, 0, - 176, 0, 0, 70, 80, 71, 72, 73, 74, 992, + 88, 0, 0, 89, 331, 90, 0, 82, 83, 220, + 221, 0, 222, 84, 175, 0, 0, 223, 0, 224, + 0, 85, 86, 87, 88, 69, 0, 89, 70, 90, + 71, 72, 73, 74, 518, 0, 0, 76, 0, 0, + 77, 0, 0, 0, 78, 0, 0, 0, 0, 0, + 0, 79, 0, 0, 176, 0, 0, 70, 80, 71, + 72, 73, 74, 993, 0, 0, 177, 0, 0, 77, + 0, 0, 0, 78, 81, 0, 0, 0, 0, 0, + 79, 0, 0, 0, 0, 0, 0, 80, 0, 0, + 0, 0, 0, 82, 83, 0, 0, 0, 0, 84, + 175, 0, 0, 81, 0, 0, 0, 85, 86, 87, + 88, 0, 0, 89, 0, 90, 0, 0, 0, 0, + 0, 0, 82, 83, 67, 0, 0, 0, 84, 0, + 0, 0, 214, 215, 216, 0, 178, 179, 87, 88, + 176, 0, 89, 70, 90, 71, 72, 73, 74, 0, 0, 0, 177, 0, 0, 77, 0, 0, 0, 78, - 81, 0, 0, 0, 0, 0, 79, 0, 0, 214, - 215, 216, 0, 80, 70, 0, 71, 72, 73, 82, - 83, 0, 0, 0, 0, 84, 67, 0, 0, 81, - 0, 0, 0, 85, 86, 87, 88, 0, 0, 89, - 0, 90, 0, 0, 80, 0, 0, 0, 82, 83, - 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, - 263, 0, 178, 179, 87, 88, 69, 0, 89, 70, - 90, 71, 72, 73, 74, 217, 218, 0, 76, 82, - 83, 77, 0, 0, 0, 78, 0, 0, 0, 0, - 0, 0, 79, 0, 0, 0, 88, 0, 0, 80, - 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 219, 220, 0, 221, 81, 0, 0, 0, 222, - 0, 223, 0, 0, 191, 0, 0, 0, 0, 0, - 0, 0, 1266, 0, 82, 83, 0, 1346, 0, 105, - 84, 106, 0, 0, 107, 108, 0, 0, 85, 86, - 87, 88, 109, 110, 89, 0, 90, 0, 0, 0, - 0, 111, 0, 112, 113, 114, 115, 0, 0, 0, - 116, 0, 0, 0, 0, 117, 0, 0, 0, 0, + 0, 0, 0, 0, 69, 0, 79, 70, 0, 71, + 72, 73, 74, 80, 0, 0, 76, 0, 0, 77, + 0, 0, 0, 78, 0, 0, 217, 0, 0, 81, + 79, 214, 215, 216, 0, 0, 0, 80, 218, 219, + 0, 0, 0, 0, 0, 214, 215, 216, 82, 83, + 0, 0, 0, 81, 84, 0, 0, 0, 0, 214, + 215, 216, 178, 179, 87, 88, 0, 0, 89, 0, + 90, 0, 82, 83, 220, 221, 0, 222, 84, 0, + 0, 0, 223, 0, 224, 217, 85, 86, 87, 88, + 0, 0, 89, 0, 90, 1267, 0, 218, 219, 217, + 1343, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 218, 219, 217, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 218, 219, 0, 0, 0, + 0, 0, 0, 220, 221, 0, 222, 0, 0, 0, + 0, 223, 0, 224, 0, 0, 0, 220, 221, 0, + 222, 0, 0, 0, 1267, 223, 0, 224, 0, 1345, + 0, 220, 221, 0, 222, 0, 0, 0, 1267, 223, + 105, 224, 106, 1347, 0, 107, 108, 0, 0, 0, + 0, 0, 0, 109, 110, 0, 292, 0, 0, 0, + 0, 0, 111, 0, 112, 113, 114, 115, 0, 0, + 0, 116, 0, 0, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 118, 119, 120, 121, 122, 123, - 0, 0, 0, 0, 0, 124, 125, 126, 127, 0, - 0, 105, 0, 106, 128, 129, 107, 108, 130, 131, - 0, 0, 0, 132, 109, 110, 0, 0, 0, 133, - 134, 0, 135, 111, 0, 112, 113, 114, 115, 0, - 136, 0, 116, 0, 0, 0, 0, 117, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 686, - 0, 0, 0, 0, 0, 0, 118, 119, 120, 121, - 122, 123, 0, 0, 0, 0, 0, 124, 125, 126, - 127, 0, 0, 105, 0, 106, 128, 129, 107, 108, - 130, 131, 0, 0, 0, 132, 109, 110, 0, 0, - 0, 133, 134, 0, 135, 111, 0, 112, 113, 114, - 115, 0, 136, 0, 116, 0, 0, 0, 0, 117, + 0, 0, 0, 0, 0, 118, 119, 120, 121, 122, + 123, 0, 0, 0, 0, 0, 124, 125, 126, 127, + 0, 0, 105, 0, 106, 128, 129, 107, 108, 130, + 131, 0, 0, 0, 132, 109, 110, 0, 0, 0, + 133, 134, 0, 135, 111, 0, 112, 113, 114, 115, + 0, 136, 0, 116, 0, 0, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 867, 0, 0, 0, 0, 0, 0, 118, 119, - 120, 121, 122, 123, 0, 0, 0, 0, 0, 124, - 125, 126, 127, 0, 0, 105, 0, 106, 128, 129, - 107, 108, 130, 131, 0, 0, 0, 132, 109, 110, - 0, 0, 0, 133, 134, 0, 135, 111, 0, 112, - 113, 114, 115, 0, 136, 0, 116, 0, 0, 0, - 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 909, 0, 0, 0, 0, 0, 0, - 118, 119, 120, 121, 122, 123, 0, 0, 0, 0, - 0, 124, 125, 126, 127, 0, 0, 105, 0, 106, - 128, 129, 107, 108, 130, 131, 0, 0, 0, 132, - 109, 110, 0, 0, 0, 133, 134, 0, 135, 111, - 0, 112, 113, 114, 115, 0, 136, 0, 116, 0, - 0, 0, 0, 117, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 1016, 0, 0, 0, 0, - 0, 0, 118, 119, 120, 121, 122, 123, 0, 0, - 0, 0, 0, 124, 125, 126, 127, 0, 0, 105, - 0, 106, 128, 129, 107, 108, 130, 131, 0, 0, - 0, 132, 109, 110, 0, 0, 0, 133, 134, 0, - 135, 111, 0, 112, 113, 114, 115, 0, 136, 0, - 116, 0, 0, 0, 0, 117, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1066, 0, 0, - 0, 0, 0, 0, 118, 119, 120, 121, 122, 123, - 0, 0, 0, 0, 0, 124, 125, 126, 127, 0, - 0, 105, 0, 106, 128, 129, 107, 108, 130, 131, - 0, 0, 0, 132, 109, 110, 0, 0, 0, 133, - 134, 0, 135, 111, 0, 112, 113, 114, 115, 0, - 136, 0, 116, 0, 0, 0, 0, 117, 0, 0, - 0, 70, 0, 71, 72, 73, 0, 0, 0, 1288, - 0, 0, 0, 262, 0, 0, 118, 119, 120, 121, - 122, 123, 0, 0, 0, 0, 0, 124, 125, 126, - 127, 80, 0, 0, 0, 0, 128, 129, 0, 0, - 130, 131, 0, 0, 105, 132, 106, 263, 0, 0, - 108, 133, 134, 0, 135, 0, 0, 109, 110, 0, - 0, 0, 136, 0, 0, 0, 82, 83, 112, 296, - 114, 0, 0, 0, 0, 116, 0, 0, 0, 0, - 297, 1430, 0, 88, 0, 0, 0, 0, 90, 0, - 0, 0, 0, 0, 0, 0, 105, 0, 106, 0, - 0, 0, 108, 122, 0, 0, 0, 0, 0, 109, - 110, 174, 0, 127, 0, 0, 0, 0, 0, 128, + 687, 0, 0, 0, 0, 0, 0, 118, 119, 120, + 121, 122, 123, 0, 0, 0, 0, 0, 124, 125, + 126, 127, 0, 0, 105, 0, 106, 128, 129, 107, + 108, 130, 131, 0, 0, 0, 132, 109, 110, 0, + 0, 0, 133, 134, 0, 135, 111, 0, 112, 113, + 114, 115, 0, 136, 0, 116, 0, 0, 0, 0, + 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 868, 0, 0, 0, 0, 0, 0, 118, + 119, 120, 121, 122, 123, 0, 0, 0, 0, 0, + 124, 125, 126, 127, 0, 0, 105, 0, 106, 128, + 129, 107, 108, 130, 131, 0, 0, 0, 132, 109, + 110, 0, 0, 0, 133, 134, 0, 135, 111, 0, + 112, 113, 114, 115, 0, 136, 0, 116, 0, 0, + 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 910, 0, 0, 0, 0, 0, + 0, 118, 119, 120, 121, 122, 123, 0, 0, 0, + 0, 0, 124, 125, 126, 127, 0, 0, 105, 0, + 106, 128, 129, 107, 108, 130, 131, 0, 0, 0, + 132, 109, 110, 0, 0, 0, 133, 134, 0, 135, + 111, 0, 112, 113, 114, 115, 0, 136, 0, 116, + 0, 0, 0, 0, 117, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1017, 0, 0, 0, + 0, 0, 0, 118, 119, 120, 121, 122, 123, 0, + 0, 0, 0, 0, 124, 125, 126, 127, 0, 0, + 105, 0, 106, 128, 129, 107, 108, 130, 131, 0, + 0, 0, 132, 109, 110, 0, 0, 0, 133, 134, + 0, 135, 111, 0, 112, 113, 114, 115, 0, 136, + 0, 116, 0, 0, 0, 0, 117, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1067, 0, + 0, 0, 0, 0, 0, 118, 119, 120, 121, 122, + 123, 0, 0, 0, 0, 0, 124, 125, 126, 127, + 0, 0, 105, 0, 106, 128, 129, 107, 108, 130, + 131, 0, 0, 0, 132, 109, 110, 0, 0, 0, + 133, 134, 0, 135, 111, 0, 112, 113, 114, 115, + 0, 136, 0, 116, 0, 214, 215, 216, 117, 0, + 0, 0, 0, 0, 0, 70, 0, 71, 72, 73, + 1289, 0, 0, 0, 0, 0, 0, 118, 119, 120, + 121, 122, 123, 0, 0, 0, 0, 0, 124, 125, + 126, 127, 482, 0, 483, 80, 0, 128, 129, 0, + 0, 130, 131, 0, 0, 0, 132, 0, 0, 217, + 0, 264, 133, 134, 105, 135, 106, 0, 0, 0, + 108, 218, 219, 136, 0, 0, 0, 109, 110, 0, + 82, 83, 0, 0, 0, 0, 0, 0, 112, 297, + 114, 0, 1431, 0, 0, 116, 0, 88, 0, 0, + 298, 0, 90, 0, 0, 0, 0, 220, 221, 0, + 222, 0, 0, 0, 0, 223, 105, 224, 106, 0, + 0, 0, 108, 122, 0, 191, 0, 0, 0, 109, + 110, 0, 0, 127, 0, 0, 0, 0, 0, 128, 112, 113, 114, 0, 131, 0, 0, 116, 0, 0, - 0, 0, 297, 0, 133, 134, 105, 135, 106, 0, + 0, 0, 298, 0, 133, 134, 105, 135, 106, 0, 0, 107, 108, 0, 0, 0, 0, 0, 0, 109, 110, 0, -149, 0, 0, 122, 0, 0, 111, 0, 112, 113, 114, 115, 0, 127, 0, 116, 0, 0, @@ -2161,10 +2166,10 @@ static const yytype_int16 yytable[] = 0, 0, 124, 125, 126, 127, 0, 0, 105, 0, 106, 128, 129, 0, 108, 130, 131, 105, 0, 106, 132, 109, 110, 108, 0, 0, 133, 134, 0, 135, - 109, 110, 112, 296, 114, 0, 0, 0, 0, 0, - 0, 112, 296, 114, 297, 0, 0, 0, 0, 0, - 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 122, 308, 0, + 109, 110, 112, 297, 114, 0, 0, 0, 0, 0, + 0, 112, 297, 114, 298, 0, 0, 0, 0, 0, + 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 122, 309, 0, 0, 0, 0, 0, 0, 0, 122, 127, 0, 0, 0, 0, 0, 128, 0, 0, 127, 0, 131, 0, 0, 0, 128, 0, 0, 0, 0, 131, 0, 134, @@ -2174,333 +2179,289 @@ static const yytype_int16 yytable[] = static const yytype_int16 yycheck[] = { - 1, 61, 315, 113, 490, 705, 92, 130, 44, 130, - 922, 601, 147, 461, 149, 150, 151, 152, 656, 154, - 182, 156, 747, 158, 727, 508, 477, 140, 13, 295, - 76, 44, 76, 15, 583, 15, 44, 140, 459, 174, - 140, 6, 490, 8, 15, 15, 710, 0, 76, 15, - 185, 186, 81, 82, 83, 147, 191, 192, 15, 88, - 481, 62, 328, 582, 76, 790, 147, 714, 489, 716, - 717, 718, 719, 720, 147, 739, 740, 169, 742, 743, - 744, 745, 150, 155, 150, 166, 59, 33, 147, 147, - 91, 92, 147, 166, 10, 11, 12, 165, 99, 165, - 146, 620, 146, 149, 140, 149, 147, 166, 166, 149, - 147, 166, 631, 33, 147, 10, 11, 12, 146, 164, - 150, 149, 147, 147, 147, 166, 164, 140, 766, 166, - 164, 165, 140, 166, 146, 165, 146, 149, 148, 75, - 150, 166, 166, 166, 147, 146, 147, 33, 149, 150, - 151, 152, 125, 154, 164, 156, 6, 158, 8, 708, - 76, 77, 711, 166, 612, 147, 147, 164, 6, 150, - 8, 257, 258, 174, 159, 33, 147, 206, 207, 208, - 209, 182, 295, 496, 185, 186, 166, 273, 274, 351, - 191, 192, 295, 253, 164, 295, 112, 113, 164, 115, - 164, 166, 688, 149, 120, 164, 122, 164, 521, 164, - 800, 324, 75, 147, 147, 328, 147, 112, 164, 165, - 810, 324, 164, 147, 324, 328, 155, 228, 328, 748, - 894, 146, 166, 166, 263, 166, 147, 272, 273, 274, - 275, 276, 166, 163, 164, 165, 467, 147, 155, 164, - 166, 147, 387, 900, 149, 166, 257, 258, 287, 295, - 610, 62, 146, 164, 928, 748, 166, 786, 787, 146, - 166, 272, 273, 274, 275, 276, 277, 163, 164, 165, - 164, 282, 295, 148, 85, 150, 164, 295, 324, 164, - 147, 164, 328, 996, 147, 143, 144, 145, 164, 750, - 147, 159, 160, 161, 105, 163, 164, 165, 164, 166, - 33, 324, 147, 166, 315, 328, 324, 907, 147, 166, - 328, 146, 123, 148, 149, 150, 146, 640, 148, 166, - 150, 166, 133, 164, 146, 783, 148, 166, 150, 165, - 166, 277, 164, 108, 109, 110, 767, 112, 113, 114, - 351, 164, 117, 164, 992, 841, 13, 122, 15, 164, - 17, 910, 127, 128, 164, 130, 131, 132, 164, 134, - 135, 164, 891, 639, 687, 165, 166, 178, 164, 146, - 181, 148, 164, 150, 605, 164, 387, 164, 978, 164, - 1093, 165, 166, 841, 615, 616, 617, 618, 619, 155, - 164, 165, 166, 60, 164, 440, 407, 164, 891, 444, - 445, 446, 447, 448, 277, 1327, 13, 164, 15, 164, - 17, 64, 65, 458, 225, 226, 164, 462, 463, 13, - 164, 15, 164, 17, 157, 158, 159, 160, 161, 440, - 163, 164, 165, 444, 445, 446, 447, 448, 477, 998, - 164, 165, 166, 165, 166, 1004, 1005, 458, 164, 165, - 166, 462, 463, 60, 165, 166, 467, 164, 165, 470, - 271, 113, 114, 115, 164, 338, 60, 146, 147, 700, - 164, 1000, 1001, 140, 10, 11, 12, 164, 289, 490, - 291, 164, 505, 164, 165, 496, 149, 154, 149, 149, - 164, 164, 159, 164, 505, 164, 164, 308, 149, 310, - 311, 312, 313, 150, 159, 48, 165, 518, 165, 147, - 521, 1246, 146, 155, 460, 461, 639, 148, 164, 330, - 164, 296, 297, 164, 164, 147, 639, 302, 339, 639, - 1089, 342, 167, 140, 166, 15, 166, 166, 166, 350, - 76, 77, 166, 166, 490, 868, 140, 154, 156, 594, - 166, 156, 159, 784, 166, 166, 166, 164, 147, 147, - 154, 156, 793, 166, 166, 159, 166, 166, 166, 166, - 164, 582, 583, 584, 166, 166, 112, 113, 389, 115, - 166, 166, 393, 594, 120, 166, 122, 460, 461, 166, - 601, 166, 166, 639, 605, 406, 166, 166, 668, 610, - 166, 156, 1312, 614, 615, 616, 617, 618, 619, 620, - 656, 159, 166, 166, 150, 166, 639, 490, 154, 164, - 631, 639, 166, 159, 166, 165, 165, 164, 166, 640, - 641, 991, 443, 656, 167, 149, 166, 583, 656, 146, - 164, 147, 147, 147, 517, 876, 147, 164, 459, 148, - 166, 149, 883, 884, 885, 886, 887, 166, 604, 48, - 471, 164, 10, 11, 12, 13, 612, 164, 164, 17, - 481, 694, 166, 164, 159, 159, 687, 169, 489, 146, - 48, 76, 752, 753, 1419, 1420, 1421, 164, 164, 700, - 760, 155, 762, 155, 155, 2, 155, 708, 166, 1258, - 711, 1260, 10, 714, 1417, 716, 717, 718, 719, 720, - 583, 750, 60, 488, 10, 10, 61, 10, 148, 156, - 766, 532, 733, 1083, 147, 736, 1086, 148, 159, 167, - 166, 604, 159, 166, 148, 148, 747, 748, 166, 612, - 159, 17, 1238, 766, 877, 146, 877, 164, 766, 56, - 57, 58, 59, 60, 166, 166, 63, 877, 1317, 166, - 169, 164, 708, 165, 112, 711, 164, 164, 149, 165, - 581, 47, 165, 784, 166, 786, 787, 164, 164, 790, - 1238, 166, 793, 147, 60, 61, 147, 1522, 147, 800, - 150, 166, 140, 863, 1529, 166, 159, 167, 165, 810, - 76, 148, 148, 148, 147, 167, 154, 10, 153, 820, - 155, 159, 157, 624, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 166, - 106, 642, 4, 109, 169, 708, 112, 783, 711, 184, - 48, 147, 164, 188, 189, 190, 1077, 468, 1407, 169, - 164, 169, 128, 147, 146, 878, 166, 868, 156, 156, - 10, 166, 166, 166, 140, 876, 156, 156, 148, 33, - 10, 882, 883, 884, 885, 886, 887, 888, 154, 1024, - 891, 10, 10, 190, 148, 147, 164, 698, 169, 900, - 22, 23, 166, 15, 167, 841, 907, 993, 169, 910, - 167, 33, 155, 678, 679, 166, 166, 166, 164, 164, - 783, 922, 166, 164, 166, 1474, 164, 166, 729, 164, - 155, 155, 155, 268, 164, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 992, 254, 1271, 98, - 1095, 1096, 259, 166, 146, 167, 767, 167, 10, 166, - 1320, 166, 166, 148, 910, 166, 166, 978, 841, 992, - 20, 21, 22, 23, 992, 10, 10, 1337, 1338, 1339, - 991, 148, 993, 33, 164, 606, 148, 998, 295, 1000, - 1001, 148, 166, 1004, 1005, 159, 160, 161, 166, 163, - 164, 165, 15, 147, 167, 626, 627, 628, 629, 630, - 166, 166, 166, 1024, 156, 322, 10, 11, 12, 156, - 156, 166, 156, 166, 148, 157, 158, 159, 160, 161, - 10, 163, 164, 165, 167, 10, 148, 910, 164, 164, - 148, 386, 1094, 10, 11, 12, 13, 164, 166, 1409, - 17, 164, 998, 148, 1241, 166, 1416, 1068, 1004, 1005, - 166, 166, 1422, 1423, 307, 1312, 1077, 694, 879, 642, - 328, 878, 1083, 1238, 1068, 1086, 841, 384, 1089, 700, - 1272, 328, 76, 77, 1095, 1096, 1205, 406, -1, -1, - -1, -1, -1, 60, 401, 402, 10, 11, 12, 13, - -1, 408, 877, 17, -1, 155, 156, 157, 158, 159, - 160, 161, -1, 163, 164, 165, 1476, -1, 112, 113, - -1, 115, -1, -1, -1, 998, 120, -1, 122, -1, - -1, 1004, 1005, -1, -1, -1, -1, -1, -1, -1, - 289, -1, -1, 1089, 111, 112, 60, -1, 1508, -1, - -1, 1247, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 1521, -1, 470, 785, 1263, 1264, 1265, 513, -1, - -1, 165, -1, 140, -1, 520, -1, -1, -1, -1, - -1, 802, -1, -1, 995, -1, -1, 154, -1, -1, - -1, -1, 159, -1, 1205, -1, -1, 164, 112, -1, - -1, 350, 547, -1, 549, -1, 551, -1, -1, 516, - -1, -1, -1, -1, -1, 1026, 1089, -1, -1, 526, - -1, -1, -1, -1, -1, -1, 140, 1238, -1, -1, - -1, -1, 10, 11, 12, 1246, 1247, -1, 1308, -1, - 154, -1, -1, -1, 1342, 159, 1344, 1258, 1346, 1260, - 164, 1349, 1350, 1351, -1, 876, -1, -1, -1, -1, - 1271, -1, 883, 884, 885, 886, 887, -1, -1, -1, - 10, 11, 12, 13, -1, 15, -1, 17, -1, -1, - 587, -1, -1, 1094, -1, 1355, 1356, -1, 1358, -1, - 1360, -1, 1238, 11, 601, -1, -1, -1, 76, 77, - -1, -1, -1, -1, -1, -1, 1317, -1, -1, 1320, - -1, -1, 1258, -1, 1260, -1, 1327, -1, -1, -1, - 60, -1, -1, 668, -1, -1, 1337, 1338, 1339, -1, - -1, -1, 639, 1403, 112, 113, 54, 115, 56, 57, - 58, -1, 120, 33, 122, -1, -1, -1, -1, 18, - 19, 20, 21, 22, 23, -1, -1, 664, 665, 666, - 667, -1, 669, -1, 33, 1238, 84, -1, -1, 518, - -1, 1317, 112, -1, -1, -1, 154, 1078, 22, 23, - 529, 159, 100, 532, -1, 1258, -1, 1260, -1, 33, - -1, -1, -1, -1, -1, -1, 1407, -1, 1409, -1, - 140, 119, 120, -1, -1, 1416, -1, -1, 1419, 1420, - 1421, 1422, 1423, -1, 154, -1, -1, -1, 136, 159, - -1, -1, -1, 141, 164, -1, -1, -1, -1, 736, - -1, -1, -1, -1, -1, -1, -1, 17, 18, 19, - 20, 21, 22, 23, 1317, 1515, 1516, 1517, -1, 1519, - -1, -1, -1, 33, -1, 1266, 1077, -1, -1, -1, - -1, 1407, -1, 1474, -1, 1476, -1, 157, 158, 159, - 160, 161, -1, 163, 164, 165, -1, -1, 823, 824, - 825, -1, 827, -1, 829, 830, 831, -1, 157, 158, - 159, 160, 161, 800, 163, 164, 165, 1508, -1, 20, - 21, 22, 23, 810, -1, -1, -1, 814, -1, -1, - 1521, 1522, 33, 157, 158, 159, 160, 161, 1529, 163, - 164, 165, -1, -1, 831, -1, -1, -1, 1474, -1, - -1, -1, -1, -1, 1407, 842, 843, 844, 845, 846, - 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, - 857, 858, 859, 860, 861, 862, 705, 864, -1, -1, - -1, 710, 10, 11, 12, 714, -1, 716, 717, 718, - 719, 720, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, -1, 163, 164, 165, -1, -1, -1, -1, - 739, 740, -1, 742, 743, 744, 745, -1, -1, -1, - 907, 1474, 1303, 1304, 1305, 1306, 1307, -1, 1309, -1, - -1, -1, -1, -1, -1, 922, -1, -1, -1, -1, - -1, 1303, 1304, 1305, 1306, 1307, -1, 1309, 76, 77, - -1, -1, -1, -1, -1, 1446, 157, 158, 159, 160, - 161, -1, 163, 164, 165, 16, 17, 18, 19, 20, - 21, 22, 23, -1, -1, -1, -1, -1, -1, 107, - -1, -1, 33, -1, 112, 113, -1, 115, -1, -1, - -1, 978, 120, 980, 122, -1, -1, -1, -1, -1, - -1, -1, -1, 1384, 1385, 1386, 1387, 1388, 1389, 1390, - 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, - 1401, 1402, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, - 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, - 1402, -1, -1, -1, -1, 1032, -1, -1, -1, -1, - -1, 1076, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 894, -1, -1, -1, 1450, - -1, 900, -1, 3, 4, 5, 6, -1, 8, 9, - 10, 11, 12, -1, -1, -1, -1, -1, 1450, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 928, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, -1, 163, 164, 165, -1, -1, -1, 169, -1, - 50, 51, -1, 1504, 54, -1, 56, 57, 58, 59, - 60, -1, 62, 63, -1, -1, 66, 67, -1, -1, - 70, -1, 1504, -1, -1, 75, 76, 77, 10, 11, - 12, 81, -1, -1, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 18, 19, 20, 21, 22, 23, -1, 108, -1, - 110, -1, 112, -1, -1, -1, 33, 117, -1, 119, - 120, 121, -1, -1, 124, 125, -1, -1, -1, 129, - -1, -1, 132, 133, 134, 135, 136, -1, -1, 139, - -1, 141, -1, -1, 76, 77, 16, 17, 18, 19, - 20, 21, 22, 23, 154, -1, -1, 157, 158, 159, - -1, -1, 162, 33, 164, 165, -1, -1, 168, -1, - -1, -1, -1, -1, 1231, -1, -1, -1, -1, -1, - 112, 113, -1, 115, -1, -1, -1, -1, 120, -1, - 122, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 10, 11, 12, -1, -1, - -1, -1, -1, 1308, -1, -1, -1, 149, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 1285, -1, - -1, -1, -1, -1, -1, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, -1, 163, 164, 165, -1, + 1, 61, 728, 748, 92, 706, 923, 140, 113, 509, + 140, 15, 316, 602, 75, 62, 140, 296, 6, 182, + 8, 478, 657, 491, 150, 15, 462, 130, 33, 59, + 13, 147, 460, 15, 15, 15, 0, 147, 85, 165, + 147, 130, 149, 150, 151, 152, 791, 154, 149, 156, + 329, 158, 164, 169, 482, 491, 166, 155, 105, 468, + 44, 62, 490, 76, 164, 44, 715, 174, 717, 718, + 719, 720, 721, 150, 15, 147, 123, 711, 185, 186, + 147, 164, 147, 33, 191, 192, 133, 6, 165, 8, + 91, 92, 44, 164, 166, 125, 146, 75, 99, 166, + 13, 166, 15, 155, 17, 584, 740, 741, 33, 743, + 744, 745, 746, 164, 164, 273, 274, 275, 276, 277, + 583, 10, 11, 12, 147, 150, 165, 166, 81, 82, + 83, 178, 767, 146, 181, 88, 149, 146, 33, 148, + 165, 150, 164, 166, 149, 146, 147, 60, 149, 150, + 151, 152, 148, 154, 150, 156, 140, 158, 621, 164, + 165, 140, 166, 296, 164, 165, 296, 147, 155, 632, + 258, 259, 296, 174, 164, 164, 159, 613, 166, 226, + 227, 182, 164, 164, 185, 186, 274, 275, 140, 352, + 191, 192, 325, 497, 254, 325, 329, 606, 146, 329, + 147, 325, 33, 165, 166, 329, 147, 616, 617, 618, + 619, 620, 801, 163, 164, 165, 164, 278, 522, 166, + 164, 689, 811, 112, 6, 272, 8, 140, 229, 76, + 709, 165, 166, 712, 159, 160, 161, 76, 163, 164, + 165, 154, 164, 290, 147, 292, 159, 64, 65, 749, + 98, 164, 901, 206, 207, 208, 209, 258, 259, 164, + 149, 895, 309, 166, 311, 312, 313, 314, 163, 164, + 165, 997, 273, 274, 275, 276, 277, 278, 339, 147, + 164, 388, 283, 441, 331, 164, 749, 445, 446, 447, + 448, 449, 701, 340, 751, 929, 343, 147, 166, 146, + 278, 459, 149, 611, 351, 463, 464, 146, 76, 146, + 149, 264, 296, 165, 166, 316, 166, 296, 164, 908, + 10, 11, 12, 13, 787, 788, 164, 17, 159, 160, + 161, 164, 163, 164, 165, 288, 147, 641, 164, 150, + 768, 325, 164, 390, 296, 329, 325, 394, 784, 164, + 329, 352, 18, 19, 20, 21, 22, 23, 993, 164, + 407, 640, 164, 147, 147, 165, 166, 33, 1094, 147, + 60, 164, 147, 325, 842, 147, 785, 329, 146, 164, + 147, 149, 166, 166, 688, 794, 149, 388, 166, 147, + 979, 166, 892, 147, 166, 164, 147, 444, 147, 166, + 461, 462, 10, 11, 12, 13, 842, 408, 166, 17, + 469, 1328, 166, 460, 13, 166, 15, 166, 17, 147, + 147, 111, 112, 164, 146, 472, 148, 149, 150, 892, + 491, 164, 911, 164, 147, 482, 147, 595, 166, 166, + 441, 147, 290, 490, 445, 446, 447, 448, 449, 164, + 140, 155, 60, 166, 164, 166, 164, 518, 459, 164, + 166, 60, 463, 464, 154, 164, 165, 468, 877, 159, + 471, 143, 144, 145, 164, 884, 885, 886, 887, 888, + 164, 165, 166, 461, 462, 164, 533, 153, 154, 164, + 491, 157, 158, 159, 160, 161, 497, 163, 164, 165, + 146, 147, 1247, 351, 112, 506, 164, 640, 164, 165, + 640, 164, 164, 491, 164, 164, 640, 149, 519, 2, + 999, 522, 149, 584, 164, 478, 1005, 1006, 164, 146, + 164, 148, 140, 150, 164, 582, 164, 166, 1001, 1002, + 150, 140, 165, 159, 605, 13, 154, 15, 607, 17, + 165, 159, 613, 149, 506, 154, 164, 146, 48, 148, + 159, 150, 164, 165, 166, 869, 147, 164, 627, 628, + 629, 630, 631, 56, 57, 58, 59, 60, 625, 155, + 63, 146, 583, 584, 585, 146, 164, 148, 148, 150, + 164, 164, 60, 147, 595, 167, 643, 164, 165, 166, + 166, 602, 166, 164, 166, 606, 584, 166, 166, 669, + 611, 1090, 1313, 166, 615, 616, 617, 618, 619, 620, + 621, 113, 114, 115, 156, 166, 156, 605, 166, 166, + 166, 632, 166, 147, 147, 613, 15, 166, 166, 166, + 641, 642, 701, 166, 166, 166, 166, 166, 709, 166, + 166, 712, 699, 156, 166, 166, 640, 166, 166, 166, + 166, 640, 156, 167, 166, 166, 166, 164, 166, 1078, + 166, 519, 140, 657, 165, 1420, 1421, 1422, 657, 159, + 165, 146, 530, 730, 992, 533, 154, 688, 640, 166, + 164, 159, 1418, 753, 754, 149, 164, 166, 147, 147, + 701, 761, 147, 763, 147, 657, 164, 190, 709, 148, + 166, 712, 164, 149, 715, 166, 717, 718, 719, 720, + 721, 768, 164, 784, 164, 166, 164, 786, 48, 164, + 159, 709, 159, 734, 712, 169, 737, 146, 48, 76, + 164, 155, 155, 695, 803, 155, 164, 748, 749, 155, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, + 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 1239, 255, 878, 166, 878, 1084, 260, 1523, 1087, + 1259, 842, 1261, 767, 785, 1530, 787, 788, 767, 878, + 791, 10, 10, 794, 10, 10, 148, 156, 751, 147, + 801, 148, 159, 1239, 864, 166, 784, 167, 159, 148, + 811, 166, 148, 296, 159, 767, 166, 166, 877, 146, + 821, 147, 166, 166, 164, 884, 885, 886, 887, 888, + 164, 169, 164, 880, 164, 166, 165, 165, 149, 1318, + 323, 165, 164, 164, 147, 147, 150, 166, 166, 166, + 911, 159, 165, 167, 61, 148, 148, 147, 706, 10, + 167, 166, 4, 711, 842, 147, 48, 715, 869, 717, + 718, 719, 720, 721, 169, 164, 877, 164, 11, 146, + 166, 169, 883, 884, 885, 886, 887, 888, 889, 169, + 147, 892, 740, 741, 156, 743, 744, 745, 746, 10, + 901, 156, 385, 156, 156, 166, 994, 908, 166, 148, + 911, 10, 166, 10, 10, 148, 147, 164, 1025, 402, + 403, 54, 923, 56, 57, 58, 409, 879, 169, 1408, + 166, 169, 167, 911, 15, 167, 166, 166, 999, 166, + 164, 148, 164, 166, 1005, 1006, 153, 164, 155, 996, + 157, 84, 159, 160, 161, 162, 163, 164, 165, 166, + 167, 168, 169, 170, 171, 172, 173, 100, 1272, 166, + 164, 166, 164, 164, 155, 155, 155, 184, 979, 155, + 1027, 188, 189, 190, 167, 146, 119, 120, 471, 1096, + 1097, 992, 166, 994, 167, 17, 1475, 166, 999, 166, + 1001, 1002, 166, 136, 1005, 1006, 166, 166, 141, 993, + 10, 33, 148, 1321, 993, 10, 148, 148, 10, 1078, + 148, 999, 166, 164, 1025, 47, 166, 1005, 1006, 1090, + 1338, 1339, 1340, 15, 517, 147, 156, 167, 60, 61, + 166, 993, 166, 156, 527, 166, 156, 895, 1095, 166, + 156, 166, 10, 901, 76, 148, 10, 148, 167, 164, + 164, 164, 269, 148, 33, 166, 164, 1095, 1069, 10, + 11, 12, 20, 21, 22, 23, 166, 1078, 166, 166, + 148, 929, 308, 1084, 106, 33, 1087, 109, 643, 1090, + 112, 10, 11, 12, 13, 1096, 1097, 1242, 17, 1313, + 879, 329, 1410, 695, 1239, 588, 128, 842, 1069, 1417, + 1206, 1273, 1090, 407, -1, 1423, 1424, 329, 140, 602, + 108, 109, 110, 64, 112, 113, 114, -1, -1, 117, + -1, -1, 154, -1, 122, 76, 77, -1, -1, 127, + 128, 60, 130, 131, 132, -1, 134, 135, -1, 10, + 11, 12, 13, -1, 15, -1, 17, 640, -1, -1, + 1248, -1, -1, -1, 10, 11, 12, -1, -1, 1477, + -1, 112, 113, -1, 115, 10, 11, 12, 1239, 120, + 387, 122, 665, 666, 667, 668, -1, 670, 157, 158, + 159, 160, 161, 112, 163, 164, 165, -1, 1259, 60, + 1261, 1509, -1, -1, -1, 1206, -1, 155, 156, 157, + 158, 159, 160, 161, 1522, 163, 164, 165, 64, -1, + 1267, 140, -1, -1, 1079, 166, -1, -1, -1, 64, + 76, 77, -1, -1, -1, 154, -1, -1, 1239, -1, + 159, 76, 77, -1, -1, -1, 1247, 1248, -1, 1309, + -1, 112, -1, -1, 737, -1, -1, 1318, 1259, -1, + 1261, 1239, -1, -1, -1, -1, 112, 113, -1, 115, + -1, 1272, -1, -1, 120, -1, 122, 112, 113, 140, + 115, 1259, -1, 1261, -1, 120, -1, 122, -1, -1, + -1, -1, 17, 154, -1, -1, 1356, 1357, 159, 1359, + -1, 1361, -1, 164, -1, -1, -1, 514, -1, 297, + 298, 146, -1, -1, 521, 303, -1, 1318, 801, 165, + 1321, -1, 47, -1, -1, -1, -1, 1328, 811, 10, + 11, 12, 815, -1, -1, 60, 61, 1338, 1339, 1340, + 1318, 548, -1, 550, 1404, 552, -1, 1408, -1, 832, + -1, 76, -1, -1, -1, -1, -1, -1, -1, -1, + 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, + 853, 854, 855, 856, 857, 858, 859, 860, 861, 862, + 863, 106, 865, 64, 109, 33, -1, 112, -1, -1, + -1, -1, -1, -1, 1242, 76, 77, -1, -1, -1, + 1447, -1, -1, 128, -1, -1, -1, 1408, -1, 1410, + -1, -1, -1, -1, 1475, 140, 1417, -1, -1, 1420, + 1421, 1422, 1423, 1424, -1, 908, -1, -1, -1, 154, + 1408, 112, 113, -1, 115, -1, -1, -1, -1, 120, + 923, 122, -1, -1, -1, -1, -1, -1, -1, 1304, + 1305, 1306, 1307, 1308, -1, 1310, 1516, 1517, 1518, -1, + 1520, -1, 669, -1, -1, 1313, 22, 23, -1, 150, + 1264, 1265, 1266, 154, 1475, -1, 1477, 33, 159, 1304, + 1305, 1306, 1307, 1308, -1, 1310, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 979, 1475, 981, -1, + -1, 489, -1, -1, -1, -1, -1, -1, 1509, 157, + 158, 159, 160, 161, -1, 163, 164, 165, -1, -1, + -1, 1522, 1523, -1, -1, -1, -1, -1, -1, 1530, + 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, + 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1343, + 1033, 1345, -1, 1347, -1, -1, 1350, 1351, 1352, -1, + 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393, 1394, + 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, -1, + 3, 4, 5, 6, -1, 8, 9, 10, 11, 12, + -1, -1, -1, -1, -1, -1, 1451, -1, -1, -1, + -1, 157, 158, 159, 160, 161, -1, 163, 164, 165, + -1, -1, -1, -1, -1, -1, -1, 824, 825, 826, + -1, 828, -1, 830, 831, 832, 1451, 50, 51, -1, + -1, 54, -1, 56, 57, 58, 59, 60, -1, 62, + 63, -1, -1, 66, 67, -1, -1, 70, -1, -1, + 1505, -1, 75, 76, 77, -1, -1, -1, 81, -1, + -1, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, + 1505, -1, -1, -1, -1, 108, -1, 110, -1, 112, + -1, 679, 680, -1, 117, -1, 119, 120, 121, -1, + -1, 124, 125, 10, 11, 12, 129, -1, -1, 132, + 133, 134, 135, 136, -1, -1, 139, -1, 141, -1, + 3, 4, 5, 6, -1, 8, 9, 10, 11, 12, + -1, 154, 15, -1, 157, 158, 159, -1, -1, 162, + -1, 164, 165, -1, -1, 168, -1, -1, -1, 1232, + -1, -1, -1, -1, -1, -1, -1, 64, -1, -1, + -1, -1, -1, -1, 47, -1, -1, 50, 51, 76, + 77, 54, -1, 56, 57, 58, 59, 60, -1, 62, + 63, -1, -1, 66, 67, -1, -1, 70, -1, -1, + -1, -1, 75, 76, 77, -1, -1, -1, -1, -1, + -1, 84, -1, 1286, -1, 112, 113, -1, 115, -1, + -1, -1, -1, 120, -1, 122, -1, 100, -1, -1, + -1, -1, -1, -1, -1, 108, -1, 110, -1, 112, + -1, -1, -1, 116, 117, -1, 119, 120, 121, 146, + -1, 124, 125, 22, 23, 1328, 129, -1, -1, 132, + 133, 134, 135, 136, 33, -1, 139, -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 18, 19, 20, 21, 22, 23, -1, - 1327, 76, 77, -1, 1369, 1370, 1371, 1372, 33, 1374, - 1375, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, -1, 163, 164, 165, -1, -1, -1, 169, - -1, -1, -1, -1, -1, -1, -1, 112, 113, -1, - 115, -1, -1, -1, -1, 120, -1, 122, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 146, 1241, -1, -1, -1, -1, 1404, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, -1, -1, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, -1, 70, -1, 72, 73, 74, - 75, 76, 77, 78, 79, 80, -1, 82, 83, 84, - 155, 156, 157, 158, 159, 160, 161, -1, 163, 164, - 165, -1, -1, 1312, -1, 100, -1, -1, -1, -1, - -1, 106, 107, 108, -1, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, -1, -1, - -1, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, -1, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, - -1, -1, -1, -1, -1, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, -1, -1, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, -1, 70, -1, 72, 73, 74, 75, 76, 77, - 78, 79, 80, -1, 82, 83, 84, -1, -1, -1, + 1077, 154, -1, -1, 157, 158, -1, -1, -1, 162, + -1, 164, -1, -1, -1, 168, -1, -1, -1, -1, + 878, -1, -1, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, -1, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, + -1, -1, 1405, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, -1, + 70, -1, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, 82, 83, 84, -1, -1, -1, 157, 158, + 159, 160, 161, -1, 163, 164, 165, -1, -1, -1, + 100, -1, -1, -1, -1, -1, 106, 107, 108, -1, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, -1, -1, -1, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 100, -1, -1, -1, -1, -1, 106, 107, - 108, -1, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, -1, -1, -1, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, -1, - 168, 169, 3, 4, 5, 6, -1, 8, 9, 10, - 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, -1, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, + -1, -1, 1309, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, -1, -1, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, -1, + 70, -1, 72, 73, 74, 75, 76, 77, 78, 79, + 80, -1, 82, 83, 84, -1, -1, -1, -1, -1, + -1, -1, -1, 1370, 1371, 1372, 1373, -1, 1375, 1376, + 100, -1, -1, -1, -1, -1, 106, 107, 108, -1, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, -1, -1, -1, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, -1, 168, 169, + 3, 4, 5, 6, -1, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, - 22, 23, -1, -1, -1, -1, -1, -1, -1, 50, - 51, 33, -1, 54, -1, 56, 57, 58, 59, -1, - -1, 62, 63, -1, -1, 66, 67, -1, -1, 70, - -1, -1, -1, -1, 75, 76, 77, -1, -1, -1, - 81, -1, -1, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - -1, -1, -1, -1, -1, -1, -1, 108, -1, 110, - -1, 112, -1, -1, -1, -1, 117, -1, 119, 120, - 121, -1, -1, 124, 125, -1, -1, -1, 129, -1, - -1, 132, 133, 134, 135, 136, -1, -1, 139, -1, - 141, 3, 4, 5, 6, -1, 8, 9, 10, 11, - -1, -1, -1, 154, -1, -1, 157, 158, 159, -1, - -1, 162, -1, 164, 165, -1, -1, 168, -1, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - -1, 163, 164, 165, -1, -1, -1, 169, 50, -1, - -1, -1, 54, -1, 56, 57, 58, -1, -1, -1, - 62, -1, 64, 65, 66, 67, -1, -1, -1, -1, - -1, -1, -1, 75, 76, 77, -1, -1, -1, 81, - -1, -1, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, - -1, -1, -1, -1, -1, -1, 108, -1, 110, -1, - 112, -1, -1, -1, -1, 117, -1, 119, 120, 121, - -1, -1, 124, -1, -1, -1, -1, 129, -1, -1, - 132, -1, -1, -1, 136, 3, 4, 5, 6, 141, - 8, 9, 10, 11, 146, 10, 11, 12, -1, -1, - -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, - 162, -1, 164, 165, -1, -1, 168, 17, 18, 19, - 20, 21, 22, 23, -1, -1, -1, -1, -1, -1, - -1, -1, 50, 33, -1, -1, 54, -1, 56, 57, - 58, -1, -1, -1, 62, -1, -1, -1, 66, 67, - -1, -1, -1, -1, -1, -1, -1, 75, 76, 77, - -1, 76, 77, 81, -1, -1, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, - 108, -1, 110, -1, 112, -1, -1, 112, 113, 117, - 115, 119, 120, 121, -1, 120, 124, 122, -1, -1, - -1, 129, -1, -1, 132, -1, -1, -1, 136, 3, - 4, 5, 6, 141, 8, 9, 10, 11, -1, -1, - -1, 146, -1, -1, -1, -1, 154, -1, -1, 157, - 158, 159, -1, -1, 162, -1, 164, 165, 166, -1, - 168, -1, 152, 153, 154, -1, -1, 157, 158, 159, - 160, 161, -1, 163, 164, 165, 50, 51, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, + -1, -1, -1, -1, -1, -1, -1, 50, 51, 33, + -1, 54, -1, 56, 57, 58, 59, -1, -1, 62, + 63, -1, -1, 66, 67, -1, -1, 70, -1, -1, + -1, -1, 75, 76, 77, -1, -1, -1, 81, -1, + -1, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, + -1, -1, -1, -1, -1, 108, -1, 110, -1, 112, + -1, -1, -1, -1, 117, -1, 119, 120, 121, -1, + -1, 124, 125, -1, -1, -1, 129, -1, -1, 132, + 133, 134, 135, 136, -1, -1, 139, -1, 141, 3, + 4, 5, 6, -1, 8, 9, 10, 11, -1, -1, + -1, 154, -1, -1, 157, 158, 159, -1, -1, 162, + -1, 164, 165, -1, -1, 168, -1, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, + 164, 165, -1, -1, -1, 169, 50, -1, -1, -1, 54, -1, 56, 57, 58, -1, -1, -1, 62, -1, - -1, -1, 66, 67, -1, -1, -1, -1, -1, -1, + 64, 65, 66, 67, 10, 11, 12, -1, -1, -1, -1, 75, 76, 77, -1, -1, -1, 81, -1, -1, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, 108, -1, 110, -1, 112, -1, - -1, -1, -1, 117, -1, 119, 120, 121, -1, -1, + -1, -1, -1, 117, -1, 119, 120, 121, 64, -1, 124, -1, -1, -1, -1, 129, -1, -1, 132, -1, - -1, -1, 136, 3, 4, 5, 6, 141, 8, 9, - 10, 11, -1, 10, 11, 12, -1, -1, 15, -1, + 76, 77, 136, 3, 4, 5, 6, 141, 8, 9, + 10, 11, 146, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, 162, -1, - 164, 165, -1, -1, 168, -1, -1, -1, 16, 17, - 18, 19, 20, 21, 22, 23, -1, -1, -1, -1, - 50, 51, -1, -1, 54, 33, 56, 57, 58, -1, - -1, -1, 62, -1, -1, -1, 66, 67, -1, -1, - -1, -1, -1, -1, -1, 75, 76, 77, -1, 76, - 77, 81, -1, -1, 84, 85, 86, 87, 88, 89, + 164, 165, -1, -1, 168, -1, 112, 113, -1, 115, + -1, -1, -1, -1, 120, -1, 122, -1, -1, -1, + 50, -1, -1, -1, 54, -1, 56, 57, 58, -1, + -1, -1, 62, -1, -1, -1, 66, 67, 10, 11, + 12, -1, -1, -1, -1, 75, 76, 77, 154, -1, + -1, 81, -1, 159, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, 108, -1, - 110, -1, 112, -1, -1, 112, 113, 117, 115, 119, - 120, 121, -1, 120, 124, 122, -1, -1, -1, 129, - -1, -1, 132, -1, -1, -1, 136, 3, 4, 5, - 6, 141, 8, 9, 10, 11, -1, 10, 11, 12, + 110, -1, 112, -1, -1, -1, -1, 117, -1, 119, + 120, 121, 64, -1, 124, -1, -1, -1, -1, 129, + -1, -1, 132, -1, 76, 77, 136, 3, 4, 5, + 6, 141, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, - -1, -1, 162, -1, 164, 165, -1, -1, 168, -1, - -1, 149, -1, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 50, 163, 164, 165, 54, -1, + -1, -1, 162, -1, 164, 165, 166, -1, 168, -1, + 112, 113, -1, 115, -1, -1, -1, -1, 120, -1, + 122, -1, -1, -1, 50, 51, -1, -1, 54, -1, 56, 57, 58, -1, -1, -1, 62, -1, -1, -1, - 66, 67, -1, -1, -1, -1, -1, -1, -1, 75, - 76, 77, -1, 76, 77, 81, -1, -1, 84, 85, + 66, 67, -1, -1, -1, -1, -1, 149, -1, 75, + 76, 77, -1, -1, -1, 81, -1, -1, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, - -1, -1, 108, -1, 110, -1, 112, -1, -1, 112, - 113, 117, 115, 119, 120, 121, -1, 120, 124, 122, + -1, -1, 108, -1, 110, -1, 112, -1, -1, -1, + -1, 117, -1, 119, 120, 121, -1, -1, 124, -1, -1, -1, -1, 129, -1, -1, 132, -1, -1, -1, 136, 3, 4, 5, 6, 141, 8, 9, 10, 11, - 146, -1, -1, -1, -1, -1, -1, -1, 154, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, 162, -1, 164, 165, -1, -1, 168, -1, -1, -1, 16, 17, 18, 19, - 20, 21, 22, 23, -1, -1, -1, -1, 50, -1, + 20, 21, 22, 23, -1, -1, -1, -1, 50, 51, -1, -1, 54, 33, 56, 57, 58, -1, -1, -1, 62, -1, -1, -1, 66, 67, -1, -1, -1, -1, -1, -1, -1, 75, 76, 77, -1, -1, -1, 81, @@ -2512,7 +2473,7 @@ static const yytype_int16 yycheck[] = 132, -1, -1, -1, 136, 3, 4, 5, 6, 141, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, - 162, -1, 164, 165, 166, -1, 168, -1, 148, -1, + 162, -1, 164, 165, -1, -1, 168, -1, -1, 149, -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 50, 163, 164, 165, 54, -1, 56, 57, 58, -1, -1, -1, 62, -1, -1, -1, 66, 67, @@ -2539,7 +2500,7 @@ static const yytype_int16 yycheck[] = -1, -1, 136, 3, 4, 5, 6, 141, 8, 9, 10, 11, -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, 162, -1, - 164, 165, 166, -1, 168, 147, -1, -1, -1, 151, + 164, 165, 166, -1, 168, -1, 148, -1, -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 50, 163, 164, 165, 54, -1, 56, 57, 58, -1, -1, -1, 62, -1, -1, -1, 66, 67, -1, -1, @@ -2550,306 +2511,355 @@ static const yytype_int16 yycheck[] = 110, -1, 112, -1, -1, -1, -1, 117, -1, 119, 120, 121, -1, -1, 124, -1, -1, -1, -1, 129, -1, -1, 132, -1, -1, -1, 136, 3, 4, 5, - 6, 141, 8, 9, 10, 11, 12, -1, -1, 15, + 6, 141, 8, 9, 10, 11, 146, -1, -1, -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, 159, - -1, -1, 162, -1, 164, 165, -1, -1, 168, 16, - 17, 18, 19, 20, 21, 22, 23, -1, -1, -1, - -1, 47, -1, -1, 50, 51, 33, -1, 54, -1, - 56, 57, 58, 59, 60, -1, 62, 63, -1, -1, - 66, 67, -1, -1, 70, -1, -1, -1, -1, 75, - 76, 77, -1, -1, -1, -1, -1, -1, 84, -1, - -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, - 22, 23, -1, -1, 100, -1, -1, -1, -1, -1, - -1, 33, 108, -1, 110, -1, 112, -1, -1, -1, - 116, 117, -1, 119, 120, 121, -1, -1, 124, 125, - -1, -1, -1, 129, -1, -1, 132, 133, 134, 135, - 136, -1, -1, 139, -1, 141, -1, 3, 4, 5, - 6, -1, 8, 9, 10, 11, 12, -1, 154, 15, - -1, 157, 158, -1, -1, -1, 162, -1, 164, -1, - 147, -1, 168, -1, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, -1, 163, 164, 165, 166, - -1, 47, -1, -1, 50, 51, -1, -1, 54, -1, - 56, 57, 58, 59, 60, -1, 62, 63, -1, -1, - 66, 67, -1, -1, 70, 10, 11, 12, -1, 75, - 76, 77, -1, -1, -1, -1, -1, 149, 84, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - -1, 163, 164, 165, 100, -1, -1, -1, -1, -1, + -1, -1, 162, -1, 164, 165, -1, -1, 168, -1, + -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, + -1, -1, -1, -1, 50, -1, -1, -1, 54, 33, + 56, 57, 58, -1, -1, -1, 62, -1, -1, -1, + 66, 67, -1, -1, -1, -1, -1, -1, -1, 75, + 76, 77, -1, -1, -1, 81, -1, -1, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, -1, -1, -1, -1, -1, -1, -1, 108, -1, 110, -1, 112, -1, -1, -1, - 116, 117, -1, 119, 120, 121, -1, -1, 124, 125, - -1, -1, -1, 129, -1, -1, 132, 133, 134, 135, - 136, 76, 77, 139, -1, 141, 3, 4, 5, 6, - -1, 8, 9, 10, -1, -1, -1, -1, 154, -1, - -1, 157, 158, -1, -1, -1, 162, -1, 164, -1, - -1, -1, 168, -1, -1, -1, -1, 112, 113, 114, - 115, -1, -1, -1, -1, 120, -1, 122, -1, -1, - -1, -1, -1, 50, -1, -1, -1, -1, 133, -1, - -1, -1, -1, 138, -1, 62, -1, -1, -1, -1, - 67, 18, 19, 20, 21, 22, 23, -1, 75, 76, - -1, -1, -1, -1, 81, -1, 33, -1, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, -1, 16, 17, 18, 19, 20, 21, - 22, 23, -1, 110, -1, 112, -1, -1, -1, -1, - 117, 33, -1, -1, 121, -1, -1, 124, -1, -1, - -1, -1, 129, -1, -1, -1, -1, -1, -1, 54, - -1, 56, 57, 58, -1, -1, -1, -1, -1, -1, - -1, 66, -1, -1, -1, -1, -1, 154, -1, -1, - 157, 158, 159, 6, -1, 162, -1, 164, 165, 84, - -1, 168, -1, 16, 17, 18, 19, 20, 21, 22, - 23, -1, -1, -1, -1, 100, -1, -1, -1, -1, - 33, -1, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 119, 120, 153, 154, 155, 156, - 157, 158, 159, 160, 161, -1, 163, 164, 165, -1, - -1, 136, 65, -1, -1, -1, 141, -1, -1, 10, - 11, 12, -1, -1, 10, 11, -1, -1, -1, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - -1, 163, 164, 165, 166, 16, 17, 18, 19, 20, - 21, 22, 23, -1, -1, 108, -1, -1, -1, -1, - -1, -1, 33, -1, -1, 51, -1, -1, 54, -1, - 56, 57, 58, 59, -1, -1, -1, 63, -1, -1, - 66, -1, -1, -1, 70, 76, 77, -1, -1, -1, - -1, 77, -1, -1, 147, -1, -1, 150, 84, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - -1, 164, 165, -1, 100, 168, -1, 10, 11, -1, - -1, 112, 113, -1, 115, 111, -1, -1, -1, 120, - -1, 122, -1, 119, 120, -1, -1, -1, -1, 125, - -1, -1, -1, -1, -1, -1, 137, 133, 134, 135, - 136, -1, -1, 139, -1, 141, -1, -1, 51, -1, - 146, 54, -1, 56, 57, 58, 59, -1, -1, -1, - 63, -1, -1, 66, -1, -1, 162, 70, 149, 17, - 151, 152, 153, 154, 77, -1, 157, 158, 159, 160, - 161, 84, 163, 164, 165, 33, -1, -1, 10, 11, - 12, -1, -1, 10, 11, -1, -1, 100, -1, 47, - -1, -1, -1, -1, -1, -1, -1, -1, 111, -1, - -1, -1, 60, 61, -1, -1, 119, 120, -1, -1, - -1, -1, 125, -1, -1, -1, -1, -1, 76, -1, - 133, 134, 135, 136, 51, -1, 139, 54, 141, 56, - 57, 58, 59, -1, -1, -1, 63, -1, -1, 66, - -1, -1, -1, 70, 76, 77, -1, -1, 106, 162, - 77, 109, -1, -1, 112, -1, -1, 84, 16, 17, - 18, 19, 20, 21, 22, 23, -1, -1, -1, -1, - 128, -1, -1, 100, -1, 33, -1, -1, -1, -1, - 112, 113, 140, 115, 111, -1, -1, -1, 120, -1, - 122, -1, 119, 120, -1, -1, 154, -1, 125, -1, - 54, 133, 56, 57, 58, -1, 133, 134, 135, 136, - -1, -1, 139, -1, 141, 16, 17, 18, 19, 20, - 21, 22, 23, -1, -1, -1, -1, -1, -1, -1, - 84, -1, 33, -1, -1, 162, 16, 17, 18, 19, - 20, 21, 22, 23, -1, -1, 100, -1, -1, -1, - -1, -1, -1, 33, 16, 17, 18, 19, 20, 21, - 22, 23, -1, -1, -1, 119, 120, -1, -1, -1, + -1, 117, -1, 119, 120, 121, -1, -1, 124, -1, + -1, -1, -1, 129, -1, -1, 132, -1, -1, -1, + 136, 3, 4, 5, 6, 141, 8, 9, 10, 11, + -1, -1, -1, -1, -1, -1, -1, -1, 154, -1, + -1, 157, 158, 159, -1, -1, 162, -1, 164, 165, + 166, -1, 168, 147, -1, -1, -1, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 50, 163, + 164, 165, 54, -1, 56, 57, 58, -1, -1, -1, + 62, -1, -1, -1, 66, 67, -1, -1, -1, -1, + -1, -1, -1, 75, 76, 77, -1, -1, -1, 81, + -1, -1, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, -1, + -1, -1, -1, -1, -1, -1, 108, -1, 110, -1, + 112, -1, -1, -1, -1, 117, -1, 119, 120, 121, + -1, -1, 124, -1, -1, -1, -1, 129, -1, -1, + 132, -1, -1, -1, 136, 3, 4, 5, 6, 141, + 8, 9, 10, 11, 12, -1, -1, 15, -1, -1, + -1, -1, 154, -1, -1, 157, 158, 159, -1, -1, + 162, -1, 164, 165, -1, -1, 168, 16, 17, 18, + 19, 20, 21, 22, 23, -1, -1, -1, -1, 47, + -1, -1, 50, 51, 33, -1, 54, -1, 56, 57, + 58, 59, 60, -1, 62, 63, -1, -1, 66, 67, + -1, -1, 70, -1, -1, -1, -1, 75, 76, 77, + -1, -1, -1, -1, -1, -1, 84, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 100, -1, -1, -1, -1, -1, -1, -1, + 108, -1, 110, -1, 112, -1, -1, -1, 116, 117, + -1, 119, 120, 121, -1, -1, 124, 125, -1, -1, + -1, 129, -1, -1, 132, 133, 134, 135, 136, -1, + -1, 139, -1, 141, 3, 4, 5, 6, -1, 8, + 9, 10, -1, -1, -1, -1, 154, -1, -1, 157, + 158, -1, -1, -1, 162, -1, 164, -1, -1, -1, + 168, -1, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, -1, 163, 164, 165, -1, -1, -1, + 169, 50, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 62, -1, -1, -1, -1, 67, 17, + 18, 19, 20, 21, 22, 23, 75, 76, -1, -1, + -1, -1, 81, -1, -1, 33, 85, 86, 87, 88, + 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, + 99, -1, 16, 17, 18, 19, 20, 21, 22, 23, + -1, 110, -1, 112, -1, -1, -1, -1, 117, 33, + -1, -1, 121, -1, -1, 124, -1, -1, -1, -1, + 129, -1, -1, -1, -1, -1, -1, 54, -1, 56, + 57, 58, -1, -1, -1, -1, -1, -1, -1, 66, + -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, + 159, 6, -1, 162, -1, 164, 165, 84, -1, 168, + -1, 16, 17, 18, 19, 20, 21, 22, 23, -1, + -1, -1, -1, 100, -1, -1, -1, -1, 33, -1, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 119, 120, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, -1, 163, 164, 165, -1, 136, + 65, -1, -1, -1, 141, -1, -1, -1, -1, -1, + -1, -1, 10, 11, -1, -1, -1, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, + 164, 165, -1, -1, -1, 169, -1, 20, 21, 22, + 23, -1, -1, 108, -1, -1, -1, -1, -1, -1, + 33, -1, -1, 51, -1, -1, 54, -1, 56, 57, + 58, 59, -1, -1, -1, 63, -1, -1, 66, -1, + -1, -1, 70, -1, -1, -1, -1, -1, -1, 77, + -1, -1, 147, -1, -1, 150, 84, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, -1, 164, + 165, -1, 100, 168, -1, 10, 11, -1, -1, -1, + -1, -1, -1, 111, -1, -1, -1, -1, -1, -1, + -1, 119, 120, -1, -1, -1, -1, 125, -1, -1, + -1, -1, -1, -1, -1, 133, 134, 135, 136, -1, + -1, 139, -1, 141, -1, -1, 51, -1, 146, 54, + -1, 56, 57, 58, 59, -1, -1, -1, 63, -1, + -1, 66, -1, -1, 162, 70, -1, -1, -1, -1, + -1, -1, 77, -1, 157, 158, 159, 160, 161, 84, + 163, 164, 165, -1, -1, -1, -1, -1, -1, -1, + -1, 10, 11, -1, -1, 100, -1, 54, -1, 56, + 57, 58, -1, -1, -1, -1, 111, -1, -1, 66, + -1, -1, -1, -1, 119, 120, -1, -1, -1, -1, + 125, -1, -1, -1, -1, -1, -1, 84, 133, 134, + 135, 136, 51, -1, 139, 54, 141, 56, 57, 58, + 59, -1, -1, 100, 63, -1, -1, 66, -1, -1, + -1, 70, -1, -1, -1, -1, -1, 162, 77, -1, + -1, -1, 119, 120, -1, 84, 16, 17, 18, 19, + 20, 21, 22, 23, -1, -1, -1, -1, -1, 136, + -1, 100, -1, 33, 141, -1, -1, -1, -1, -1, + -1, 54, 111, 56, 57, 58, -1, -1, -1, -1, + 119, 120, -1, -1, -1, -1, 125, 164, -1, -1, + -1, -1, -1, -1, 133, 134, 135, 136, -1, -1, + 139, 84, 141, 16, 17, 18, 19, 20, 21, 22, + 23, -1, -1, -1, -1, -1, -1, 100, -1, -1, + 33, -1, -1, 162, 16, 17, 18, 19, 20, 21, + 22, 23, -1, -1, -1, -1, 119, 120, -1, -1, -1, 33, 16, 17, 18, 19, 20, 21, 22, 23, - -1, -1, 136, -1, -1, -1, -1, 141, -1, 33, - -1, -1, -1, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, -1, 163, 164, 165, 166, 16, - 17, 18, 19, 20, 21, 22, 23, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 33, 16, 17, 18, - 19, 20, 21, 22, 23, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, -1, 163, 164, 165, 166, -1, -1, -1, -1, + -1, -1, -1, 136, -1, -1, -1, -1, 141, 33, + -1, 16, 17, 18, 19, 20, 21, 22, 23, -1, + -1, -1, -1, -1, -1, -1, -1, 147, 33, -1, -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, -1, 163, 164, 165, 166, -1, -1, 151, + 160, 161, -1, 163, 164, 165, 166, 16, 17, 18, + 19, 20, 21, 22, 23, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, 16, 17, 18, 19, 20, + 21, 22, 23, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 33, -1, -1, -1, -1, -1, 151, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, -1, + 163, 164, 165, 166, -1, -1, -1, -1, -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, 164, 165, 166, -1, -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, + 164, 165, 166, -1, -1, -1, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, -1, 163, 164, + 165, 166, 16, 17, 18, 19, 20, 21, 22, 23, + -1, -1, -1, -1, -1, -1, 10, 11, 12, 33, + -1, 15, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, -1, 163, 164, 165, 166, -1, -1, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, -1, 163, 164, 165, 166, 16, 17, 18, 19, + 20, 21, 22, 23, -1, -1, 10, 11, 12, -1, + 64, -1, -1, 33, 16, 17, 18, 19, 20, 21, + 22, 23, 76, 77, -1, -1, -1, -1, -1, -1, + -1, 33, 16, 17, 18, 19, 20, 21, 22, 23, + -1, -1, -1, 47, -1, 49, -1, -1, -1, 33, + 16, 17, 18, 19, 20, 21, 22, 23, 112, 113, + 64, 115, -1, -1, -1, -1, 120, 33, 122, -1, + -1, -1, 76, 77, -1, -1, -1, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, 164, 165, 166, 16, 17, 18, 19, 20, 21, 22, - 23, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 33, -1, -1, -1, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, -1, 163, 164, 165, 166, - -1, -1, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, -1, 163, 164, 165, 16, 17, 18, - 19, 20, 21, 22, 23, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 18, 19, 20, 21, 22, 23, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 33, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, -1, + 23, -1, -1, -1, -1, -1, -1, -1, 112, 113, + 33, 115, -1, -1, -1, -1, 120, -1, 122, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 149, + -1, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 146, 163, 164, 165, -1, -1, -1, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + -1, 163, 164, 165, -1, -1, -1, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, -1, 163, + 164, 165, -1, 149, -1, 151, 152, 153, 154, -1, + -1, 157, 158, 159, 160, 161, 0, 163, 164, 165, + -1, -1, -1, -1, -1, 17, 18, 19, 20, 21, + 22, 23, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 33, -1, -1, -1, -1, -1, -1, 151, 152, + 153, 154, -1, -1, 157, 158, 159, 160, 161, -1, 163, 164, 165, 47, -1, 49, -1, -1, 52, 53, -1, -1, -1, -1, -1, -1, 60, 61, -1, -1, -1, -1, -1, -1, -1, 69, -1, 71, 72, 73, 74, -1, -1, -1, 78, -1, -1, -1, -1, 83, - -1, -1, 151, 152, 153, 154, -1, -1, 157, 158, - 159, 160, 161, -1, 163, 164, 165, -1, 102, 103, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 102, 103, 104, 105, 106, 107, -1, -1, -1, -1, -1, 113, 114, 115, 116, -1, -1, -1, -1, -1, 122, 123, 11, 12, 126, 127, 15, -1, 17, 131, -1, -1, -1, -1, -1, 137, 138, -1, 140, -1, -1, -1, - -1, -1, -1, -1, 148, -1, -1, -1, 154, 155, - 156, 157, 158, 159, 160, 161, 47, 163, 164, 165, + 152, 153, 154, -1, 148, 157, 158, 159, 160, 161, + -1, 163, 164, 165, -1, -1, 47, -1, -1, -1, 51, -1, -1, 54, -1, 56, 57, 58, 59, 60, -1, -1, 63, -1, -1, 66, -1, -1, -1, 70, - 18, 19, 20, 21, 22, 23, 77, -1, -1, 10, - 11, 12, -1, 84, -1, 33, 18, 19, 20, 21, + 18, 19, 20, 21, 22, 23, 77, -1, -1, -1, + -1, -1, -1, 84, -1, 33, 18, 19, 20, 21, 22, 23, -1, -1, -1, -1, -1, -1, -1, 100, -1, 33, 18, 19, 20, 21, 22, 23, -1, -1, -1, -1, -1, -1, -1, 116, -1, 33, 119, 120, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - -1, -1, 133, 134, 135, 136, -1, -1, 139, -1, - 141, -1, -1, -1, -1, 76, 77, -1, -1, -1, - -1, -1, -1, 154, -1, -1, -1, -1, 159, -1, + -1, -1, -1, -1, 125, -1, 18, 19, 20, 21, + 22, 23, 133, 134, 135, 136, -1, -1, 139, -1, + 141, 33, 18, 19, 20, 21, 22, 23, -1, -1, + -1, -1, -1, 154, -1, -1, -1, 33, 159, 18, + 19, 20, 21, 22, 23, -1, -1, -1, 18, 19, + 20, 21, 22, 23, 33, -1, -1, -1, -1, -1, + -1, -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, -1, 163, 164, 165, -1, -1, + -1, 153, 154, 155, 156, 157, 158, 159, 160, 161, + -1, 163, 164, 165, -1, -1, -1, -1, 154, 155, + 156, 157, 158, 159, 160, 161, -1, 163, 164, 165, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 112, 113, -1, 115, -1, -1, -1, -1, 120, - -1, 122, -1, -1, -1, -1, -1, 10, 11, 12, - -1, -1, 133, -1, 152, 153, 154, 138, -1, 157, - 158, 159, 160, 161, 6, 163, 164, 165, -1, -1, - -1, 153, 154, -1, -1, 157, 158, 159, 160, 161, - 11, 163, 164, 165, 47, -1, 49, -1, 154, -1, - -1, 157, 158, 159, 160, 161, -1, 163, 164, 165, - -1, 6, -1, -1, -1, 47, -1, 49, -1, -1, - -1, 53, -1, 76, 77, -1, -1, -1, 60, 61, - 51, -1, -1, 54, -1, 56, 57, 58, 59, 71, - 72, 73, 63, -1, -1, 66, -1, -1, -1, 70, - -1, 83, 47, -1, 49, -1, 77, -1, 53, 112, - 113, -1, 115, 84, -1, 60, 61, 120, -1, 122, - -1, -1, -1, -1, 106, -1, 71, 72, 73, 100, - -1, -1, -1, -1, 116, -1, -1, -1, 83, -1, - 122, -1, -1, 146, 126, 127, -1, -1, 119, 120, - 10, 11, 12, -1, 125, -1, 138, -1, 140, -1, - -1, 106, 133, 134, 135, 136, -1, -1, 139, -1, - 141, 116, -1, -1, -1, -1, -1, 122, -1, 10, - 11, 12, 127, -1, -1, -1, -1, -1, -1, -1, - -1, 51, -1, 138, 54, 140, 56, 57, 58, 59, - 60, -1, -1, 63, -1, -1, 66, -1, -1, -1, - 70, -1, -1, -1, -1, -1, -1, 77, -1, -1, - 51, -1, -1, 54, 84, 56, 57, 58, 59, 60, + 152, 153, 154, -1, -1, 157, 158, 159, 160, 161, + -1, 163, 164, 165, -1, 6, -1, -1, 6, 155, + 156, 157, 158, 159, 160, 161, -1, 163, 164, 165, + -1, -1, -1, -1, -1, 154, -1, -1, 157, 158, + 159, 160, 161, -1, 163, 164, 165, 157, 158, 159, + 160, 161, -1, 163, 164, 165, 47, -1, 49, 47, + -1, 49, 53, -1, -1, 53, -1, -1, -1, 60, + 61, -1, 60, 61, -1, 10, 11, 12, -1, -1, + 71, 72, 73, 71, 72, 73, -1, -1, -1, -1, + -1, -1, 83, -1, -1, 83, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, + -1, -1, -1, -1, -1, 106, -1, -1, 106, -1, + -1, -1, -1, -1, -1, 116, -1, -1, 116, 64, + -1, 122, -1, -1, 122, 126, 127, -1, -1, 127, + -1, 76, 77, -1, -1, -1, -1, 138, 51, 140, + 138, 54, 140, 56, 57, 58, 59, 60, -1, -1, + 63, -1, -1, 66, -1, -1, -1, 70, -1, -1, + -1, -1, -1, -1, 77, -1, -1, 112, 113, 114, + 115, 84, -1, -1, -1, 120, -1, 122, -1, -1, + -1, -1, -1, 10, 11, 12, -1, 100, 133, -1, + -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 119, 120, -1, -1, + -1, -1, 125, -1, 10, 11, 12, -1, -1, -1, + 133, 134, 135, 136, 51, -1, 139, 54, 141, 56, + 57, 58, 59, 60, -1, -1, 63, -1, -1, 66, + -1, -1, -1, 70, -1, -1, -1, -1, -1, -1, + 77, -1, -1, -1, -1, 51, -1, 84, 54, -1, + 56, 57, 58, 59, 60, -1, -1, 63, -1, -1, + 66, -1, -1, 100, 70, -1, -1, -1, -1, -1, + -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, + -1, -1, 119, 120, -1, -1, -1, -1, 125, -1, + 10, 11, 12, -1, 100, -1, 133, 134, 135, 136, + -1, -1, 139, -1, 141, 10, 11, 12, -1, -1, + -1, -1, -1, 119, 120, -1, -1, -1, -1, 125, + 54, -1, 56, 57, 58, -1, -1, 133, 134, 135, + 136, -1, -1, 139, 54, 141, 56, 57, 58, 59, + 60, -1, -1, 10, 11, 12, 66, -1, -1, 54, + 84, 56, 57, 58, -1, -1, -1, 77, -1, -1, + -1, 66, -1, -1, 84, -1, 100, -1, -1, -1, + -1, -1, 77, -1, -1, -1, -1, -1, -1, 84, + 100, -1, -1, -1, -1, 119, 120, -1, -1, -1, + -1, -1, 11, 12, -1, 100, 15, 64, -1, 119, + 120, -1, 136, -1, -1, -1, -1, 141, -1, 76, + 77, -1, -1, 133, 119, 120, 136, -1, -1, 139, + -1, 141, -1, 11, 12, -1, -1, 15, 47, -1, + 164, 136, 51, -1, 139, 54, 141, 56, 57, 58, + 59, 60, -1, -1, 63, 112, 113, 66, 115, -1, + -1, 70, -1, 120, -1, 122, -1, -1, 77, 47, + -1, -1, -1, 51, -1, 84, 54, -1, 56, 57, + 58, 59, 60, -1, -1, 63, -1, -1, 66, -1, + -1, 100, 70, -1, -1, -1, -1, -1, -1, 77, + -1, -1, -1, -1, -1, -1, 84, 116, -1, -1, + 119, 120, -1, -1, -1, -1, 125, -1, 10, 11, + 12, -1, 100, -1, 133, 134, 135, 136, 11, 12, + 139, -1, 141, -1, -1, -1, -1, -1, 116, -1, + -1, 119, 120, -1, -1, -1, -1, 125, -1, -1, + -1, -1, -1, -1, -1, 133, 134, 135, 136, 11, + 12, 139, -1, 141, 47, -1, -1, -1, 51, -1, + -1, 54, 64, 56, 57, 58, 59, 60, -1, -1, + 63, -1, -1, 66, 76, 77, -1, 70, -1, 54, + -1, 56, 57, 58, 77, -1, -1, -1, -1, 51, + -1, 84, 54, -1, 56, 57, 58, 59, 60, -1, + -1, 63, -1, -1, 66, -1, -1, 100, 70, 84, + 112, 113, -1, 115, -1, 77, -1, -1, 120, -1, + 122, -1, 84, 116, -1, 100, 119, 120, -1, -1, + -1, 133, 125, -1, -1, 11, 12, -1, 100, -1, + 133, 134, 135, 136, 119, 120, 139, -1, 141, -1, + -1, -1, -1, -1, -1, -1, -1, 119, 120, 11, + 12, 136, -1, 125, -1, -1, 141, 10, 11, 12, + -1, 133, 134, 135, 136, 51, -1, 139, 54, 141, + 56, 57, 58, 59, -1, -1, -1, 63, -1, 164, + 66, -1, -1, -1, 70, -1, -1, -1, -1, 51, + -1, 77, 54, -1, 56, 57, 58, 59, 84, -1, + -1, 63, -1, -1, 66, -1, -1, -1, 70, -1, + -1, 64, -1, -1, 100, 77, -1, -1, -1, -1, + -1, -1, 84, 76, 77, -1, -1, -1, -1, -1, + 116, -1, -1, 119, 120, 11, -1, -1, 100, 125, + -1, -1, -1, -1, -1, -1, -1, 133, 134, 135, + 136, -1, -1, 139, 107, 141, -1, 119, 120, 112, + 113, -1, 115, 125, 11, -1, -1, 120, -1, 122, + -1, 133, 134, 135, 136, 51, -1, 139, 54, 141, + 56, 57, 58, 59, 60, -1, -1, 63, -1, -1, + 66, -1, -1, -1, 70, -1, -1, -1, -1, -1, + -1, 77, -1, -1, 51, -1, -1, 54, 84, 56, + 57, 58, 59, 60, -1, -1, 63, -1, -1, 66, + -1, -1, -1, 70, 100, -1, -1, -1, -1, -1, + 77, -1, -1, -1, -1, -1, -1, 84, -1, -1, + -1, -1, -1, 119, 120, -1, -1, -1, -1, 125, + 11, -1, -1, 100, -1, -1, -1, 133, 134, 135, + 136, -1, -1, 139, -1, 141, -1, -1, -1, -1, + -1, -1, 119, 120, 11, -1, -1, -1, 125, -1, + -1, -1, 10, 11, 12, -1, 133, 134, 135, 136, + 51, -1, 139, 54, 141, 56, 57, 58, 59, -1, -1, -1, 63, -1, -1, 66, -1, -1, -1, 70, - 100, -1, -1, -1, -1, -1, 77, 54, -1, 56, - 57, 58, -1, 84, -1, -1, -1, -1, -1, 119, - 120, -1, -1, -1, -1, 125, -1, -1, -1, 100, - 10, 11, 12, 133, 134, 135, 136, 84, -1, 139, - -1, 141, -1, -1, -1, -1, -1, -1, 119, 120, + -1, -1, -1, -1, 51, -1, 77, 54, -1, 56, + 57, 58, 59, 84, -1, -1, 63, -1, -1, 66, + -1, -1, -1, 70, -1, -1, 64, -1, -1, 100, + 77, 10, 11, 12, -1, -1, -1, 84, 76, 77, + -1, -1, -1, -1, -1, 10, 11, 12, 119, 120, -1, -1, -1, 100, 125, -1, -1, -1, -1, 10, 11, 12, 133, 134, 135, 136, -1, -1, 139, -1, - 141, 51, 119, 120, 54, -1, 56, 57, 58, 59, - 60, -1, -1, 63, -1, -1, 66, -1, -1, 136, - 70, -1, -1, -1, 141, -1, -1, 77, -1, -1, - -1, -1, -1, 54, 84, 56, 57, 58, 59, 60, - -1, -1, -1, -1, -1, 66, -1, 164, -1, -1, - 100, -1, -1, -1, -1, -1, 77, 10, 11, 12, - -1, -1, -1, 84, -1, -1, -1, -1, -1, 119, - 120, -1, -1, -1, -1, 125, -1, -1, -1, 100, - -1, -1, -1, 133, 134, 135, 136, -1, -1, 139, - -1, 141, -1, -1, -1, -1, 11, 12, 119, 120, - 15, 54, -1, 56, 57, 58, -1, -1, -1, -1, - -1, -1, 133, 66, -1, 136, -1, -1, 139, -1, - 141, -1, -1, -1, 77, 11, 12, -1, -1, 15, - -1, 84, 47, -1, -1, -1, 51, -1, -1, 54, - -1, 56, 57, 58, 59, 60, -1, 100, 63, -1, - -1, 66, -1, -1, -1, 70, -1, -1, -1, -1, - -1, 47, 77, -1, -1, 51, 119, 120, 54, 84, - 56, 57, 58, 59, 60, -1, -1, 63, -1, -1, - 66, -1, -1, 136, 70, 100, 139, -1, 141, -1, - -1, 77, -1, -1, -1, -1, -1, -1, 84, -1, - -1, 116, -1, -1, 119, 120, -1, -1, -1, -1, - 125, -1, -1, -1, 100, -1, 11, 12, 133, 134, - 135, 136, -1, -1, 139, -1, 141, -1, -1, -1, - 116, -1, -1, 119, 120, -1, -1, -1, -1, 125, - 10, 11, 12, -1, -1, 11, 12, 133, 134, 135, - 136, -1, 47, 139, -1, 141, 51, -1, -1, 54, - -1, 56, 57, 58, 59, 60, -1, -1, 63, -1, - -1, 66, -1, -1, -1, 70, -1, 47, -1, 49, - -1, -1, 77, -1, -1, 51, -1, -1, 54, 84, - 56, 57, 58, 59, 60, -1, -1, 63, -1, -1, - 66, -1, -1, -1, 70, 100, 76, 77, -1, -1, - -1, 77, -1, -1, 10, 11, 12, -1, 84, -1, - -1, 116, -1, -1, 119, 120, -1, -1, -1, -1, - 125, 11, 12, -1, 100, -1, -1, -1, 133, 134, - 135, 136, 112, 113, 139, 115, 141, -1, -1, -1, - 120, -1, 122, 119, 120, 11, 12, -1, -1, 125, - -1, -1, -1, -1, -1, -1, -1, 133, 134, 135, - 136, 51, -1, 139, 54, 141, 56, 57, 58, 59, - 76, 77, -1, 63, -1, 54, 66, 56, 57, 58, - 70, -1, -1, -1, -1, 51, -1, 77, 54, -1, - 56, 57, 58, 59, 84, -1, -1, 63, -1, -1, - 66, -1, -1, -1, 70, 84, 112, 113, -1, 115, - 100, 77, -1, -1, 120, -1, 122, -1, 84, -1, - -1, 100, -1, -1, -1, -1, 116, 133, -1, 119, - 120, 11, 138, -1, 100, 125, -1, -1, -1, -1, - 119, 120, -1, 133, 134, 135, 136, -1, -1, 139, - -1, 141, -1, 119, 120, -1, -1, 136, -1, 125, - 11, -1, 141, -1, -1, -1, -1, 133, 134, 135, - 136, 51, -1, 139, 54, 141, 56, 57, 58, 59, - 60, -1, -1, 63, -1, 164, 66, -1, -1, -1, - 70, -1, -1, -1, -1, -1, -1, 77, -1, -1, - 51, -1, -1, 54, 84, 56, 57, 58, 59, 60, - -1, -1, 63, -1, -1, 66, -1, -1, -1, 70, - 100, -1, -1, -1, -1, -1, 77, -1, -1, 10, - 11, 12, -1, 84, 54, -1, 56, 57, 58, 119, - 120, -1, -1, -1, -1, 125, 11, -1, -1, 100, - -1, -1, -1, 133, 134, 135, 136, -1, -1, 139, - -1, 141, -1, -1, 84, -1, -1, -1, 119, 120, - -1, -1, -1, -1, 125, -1, -1, -1, -1, -1, - 100, -1, 133, 134, 135, 136, 51, -1, 139, 54, - 141, 56, 57, 58, 59, 76, 77, -1, 63, 119, - 120, 66, -1, -1, -1, 70, -1, -1, -1, -1, - -1, -1, 77, -1, -1, -1, 136, -1, -1, 84, - -1, 141, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 112, 113, -1, 115, 100, -1, -1, -1, 120, - -1, 122, -1, -1, 164, -1, -1, -1, -1, -1, - -1, -1, 133, -1, 119, 120, -1, 138, -1, 47, - 125, 49, -1, -1, 52, 53, -1, -1, 133, 134, - 135, 136, 60, 61, 139, -1, 141, -1, -1, -1, - -1, 69, -1, 71, 72, 73, 74, -1, -1, -1, - 78, -1, -1, -1, -1, 83, -1, -1, -1, -1, + 141, -1, 119, 120, 112, 113, -1, 115, 125, -1, + -1, -1, 120, -1, 122, 64, 133, 134, 135, 136, + -1, -1, 139, -1, 141, 133, -1, 76, 77, 64, + 138, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 76, 77, 64, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 76, 77, -1, -1, -1, + -1, -1, -1, 112, 113, -1, 115, -1, -1, -1, + -1, 120, -1, 122, -1, -1, -1, 112, 113, -1, + 115, -1, -1, -1, 133, 120, -1, 122, -1, 138, + -1, 112, 113, -1, 115, -1, -1, -1, 133, 120, + 47, 122, 49, 138, -1, 52, 53, -1, -1, -1, + -1, -1, -1, 60, 61, -1, 137, -1, -1, -1, + -1, -1, 69, -1, 71, 72, 73, 74, -1, -1, + -1, 78, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 102, 103, 104, 105, 106, 107, - -1, -1, -1, -1, -1, 113, 114, 115, 116, -1, - -1, 47, -1, 49, 122, 123, 52, 53, 126, 127, - -1, -1, -1, 131, 60, 61, -1, -1, -1, 137, - 138, -1, 140, 69, -1, 71, 72, 73, 74, -1, - 148, -1, 78, -1, -1, -1, -1, 83, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 167, - -1, -1, -1, -1, -1, -1, 102, 103, 104, 105, - 106, 107, -1, -1, -1, -1, -1, 113, 114, 115, - 116, -1, -1, 47, -1, 49, 122, 123, 52, 53, - 126, 127, -1, -1, -1, 131, 60, 61, -1, -1, - -1, 137, 138, -1, 140, 69, -1, 71, 72, 73, - 74, -1, 148, -1, 78, -1, -1, -1, -1, 83, + -1, -1, -1, -1, -1, 102, 103, 104, 105, 106, + 107, -1, -1, -1, -1, -1, 113, 114, 115, 116, + -1, -1, 47, -1, 49, 122, 123, 52, 53, 126, + 127, -1, -1, -1, 131, 60, 61, -1, -1, -1, + 137, 138, -1, 140, 69, -1, 71, 72, 73, 74, + -1, 148, -1, 78, -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 167, -1, -1, -1, -1, -1, -1, 102, 103, - 104, 105, 106, 107, -1, -1, -1, -1, -1, 113, - 114, 115, 116, -1, -1, 47, -1, 49, 122, 123, - 52, 53, 126, 127, -1, -1, -1, 131, 60, 61, - -1, -1, -1, 137, 138, -1, 140, 69, -1, 71, - 72, 73, 74, -1, 148, -1, 78, -1, -1, -1, - -1, 83, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 167, -1, -1, -1, -1, -1, -1, - 102, 103, 104, 105, 106, 107, -1, -1, -1, -1, - -1, 113, 114, 115, 116, -1, -1, 47, -1, 49, - 122, 123, 52, 53, 126, 127, -1, -1, -1, 131, - 60, 61, -1, -1, -1, 137, 138, -1, 140, 69, - -1, 71, 72, 73, 74, -1, 148, -1, 78, -1, - -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 167, -1, -1, -1, -1, - -1, -1, 102, 103, 104, 105, 106, 107, -1, -1, - -1, -1, -1, 113, 114, 115, 116, -1, -1, 47, - -1, 49, 122, 123, 52, 53, 126, 127, -1, -1, - -1, 131, 60, 61, -1, -1, -1, 137, 138, -1, - 140, 69, -1, 71, 72, 73, 74, -1, 148, -1, - 78, -1, -1, -1, -1, 83, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 167, -1, -1, - -1, -1, -1, -1, 102, 103, 104, 105, 106, 107, - -1, -1, -1, -1, -1, 113, 114, 115, 116, -1, - -1, 47, -1, 49, 122, 123, 52, 53, 126, 127, - -1, -1, -1, 131, 60, 61, -1, -1, -1, 137, - 138, -1, 140, 69, -1, 71, 72, 73, 74, -1, - 148, -1, 78, -1, -1, -1, -1, 83, -1, -1, - -1, 54, -1, 56, 57, 58, -1, -1, -1, 167, - -1, -1, -1, 66, -1, -1, 102, 103, 104, 105, - 106, 107, -1, -1, -1, -1, -1, 113, 114, 115, - 116, 84, -1, -1, -1, -1, 122, 123, -1, -1, - 126, 127, -1, -1, 47, 131, 49, 100, -1, -1, - 53, 137, 138, -1, 140, -1, -1, 60, 61, -1, - -1, -1, 148, -1, -1, -1, 119, 120, 71, 72, - 73, -1, -1, -1, -1, 78, -1, -1, -1, -1, - 83, 167, -1, 136, -1, -1, -1, -1, 141, -1, - -1, -1, -1, -1, -1, -1, 47, -1, 49, -1, - -1, -1, 53, 106, -1, -1, -1, -1, -1, 60, - 61, 164, -1, 116, -1, -1, -1, -1, -1, 122, + 167, -1, -1, -1, -1, -1, -1, 102, 103, 104, + 105, 106, 107, -1, -1, -1, -1, -1, 113, 114, + 115, 116, -1, -1, 47, -1, 49, 122, 123, 52, + 53, 126, 127, -1, -1, -1, 131, 60, 61, -1, + -1, -1, 137, 138, -1, 140, 69, -1, 71, 72, + 73, 74, -1, 148, -1, 78, -1, -1, -1, -1, + 83, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 167, -1, -1, -1, -1, -1, -1, 102, + 103, 104, 105, 106, 107, -1, -1, -1, -1, -1, + 113, 114, 115, 116, -1, -1, 47, -1, 49, 122, + 123, 52, 53, 126, 127, -1, -1, -1, 131, 60, + 61, -1, -1, -1, 137, 138, -1, 140, 69, -1, + 71, 72, 73, 74, -1, 148, -1, 78, -1, -1, + -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 167, -1, -1, -1, -1, -1, + -1, 102, 103, 104, 105, 106, 107, -1, -1, -1, + -1, -1, 113, 114, 115, 116, -1, -1, 47, -1, + 49, 122, 123, 52, 53, 126, 127, -1, -1, -1, + 131, 60, 61, -1, -1, -1, 137, 138, -1, 140, + 69, -1, 71, 72, 73, 74, -1, 148, -1, 78, + -1, -1, -1, -1, 83, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 167, -1, -1, -1, + -1, -1, -1, 102, 103, 104, 105, 106, 107, -1, + -1, -1, -1, -1, 113, 114, 115, 116, -1, -1, + 47, -1, 49, 122, 123, 52, 53, 126, 127, -1, + -1, -1, 131, 60, 61, -1, -1, -1, 137, 138, + -1, 140, 69, -1, 71, 72, 73, 74, -1, 148, + -1, 78, -1, -1, -1, -1, 83, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 167, -1, + -1, -1, -1, -1, -1, 102, 103, 104, 105, 106, + 107, -1, -1, -1, -1, -1, 113, 114, 115, 116, + -1, -1, 47, -1, 49, 122, 123, 52, 53, 126, + 127, -1, -1, -1, 131, 60, 61, -1, -1, -1, + 137, 138, -1, 140, 69, -1, 71, 72, 73, 74, + -1, 148, -1, 78, -1, 10, 11, 12, 83, -1, + -1, -1, -1, -1, -1, 54, -1, 56, 57, 58, + 167, -1, -1, -1, -1, -1, -1, 102, 103, 104, + 105, 106, 107, -1, -1, -1, -1, -1, 113, 114, + 115, 116, 47, -1, 49, 84, -1, 122, 123, -1, + -1, 126, 127, -1, -1, -1, 131, -1, -1, 64, + -1, 100, 137, 138, 47, 140, 49, -1, -1, -1, + 53, 76, 77, 148, -1, -1, -1, 60, 61, -1, + 119, 120, -1, -1, -1, -1, -1, -1, 71, 72, + 73, -1, 167, -1, -1, 78, -1, 136, -1, -1, + 83, -1, 141, -1, -1, -1, -1, 112, 113, -1, + 115, -1, -1, -1, -1, 120, 47, 122, 49, -1, + -1, -1, 53, 106, -1, 164, -1, -1, -1, 60, + 61, -1, -1, 116, -1, -1, -1, -1, -1, 122, 71, 72, 73, -1, 127, -1, -1, 78, -1, -1, -1, -1, 83, -1, 137, 138, 47, 140, 49, -1, -1, 52, 53, -1, -1, -1, -1, -1, -1, 60, @@ -2897,139 +2907,139 @@ static const yytype_uint16 yystos[] = 233, 250, 251, 256, 155, 164, 164, 15, 164, 155, 164, 164, 164, 268, 268, 268, 268, 268, 11, 54, 56, 57, 58, 66, 77, 84, 100, 119, 120, 136, - 141, 235, 266, 268, 10, 11, 12, 76, 77, 112, - 113, 115, 120, 122, 150, 154, 159, 272, 273, 275, - 278, 268, 16, 17, 18, 19, 20, 21, 22, 23, - 33, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 163, 164, 165, 6, 8, 230, 231, 164, - 59, 125, 66, 100, 257, 257, 257, 275, 164, 257, - 13, 15, 17, 60, 140, 154, 159, 164, 228, 229, - 278, 229, 146, 10, 11, 12, 112, 149, 276, 236, - 278, 137, 181, 182, 275, 164, 72, 83, 180, 180, - 180, 180, 6, 180, 202, 180, 149, 179, 107, 180, - 164, 164, 164, 164, 180, 146, 275, 149, 149, 149, - 180, 180, 164, 178, 180, 183, 203, 180, 180, 187, - 107, 275, 180, 180, 10, 11, 51, 63, 111, 133, - 134, 146, 162, 190, 193, 232, 234, 237, 239, 245, - 250, 251, 256, 265, 266, 278, 265, 235, 265, 265, - 265, 265, 235, 265, 235, 265, 235, 265, 235, 235, + 141, 235, 266, 268, 10, 11, 12, 64, 76, 77, + 112, 113, 115, 120, 122, 150, 154, 159, 272, 273, + 275, 278, 268, 16, 17, 18, 19, 20, 21, 22, + 23, 33, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 163, 164, 165, 6, 8, 230, 231, + 164, 59, 125, 66, 100, 257, 257, 257, 275, 164, + 257, 13, 15, 17, 60, 140, 154, 159, 164, 228, + 229, 278, 229, 146, 10, 11, 12, 112, 149, 276, + 236, 278, 137, 181, 182, 275, 164, 72, 83, 180, + 180, 180, 180, 6, 180, 202, 180, 149, 179, 107, + 180, 164, 164, 164, 164, 180, 146, 275, 149, 149, + 149, 180, 180, 164, 178, 180, 183, 203, 180, 180, + 187, 107, 275, 180, 180, 10, 11, 51, 63, 111, + 133, 134, 146, 162, 190, 193, 232, 234, 237, 239, + 245, 250, 251, 256, 265, 266, 278, 265, 235, 265, + 265, 265, 265, 235, 265, 235, 265, 235, 265, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, 235, - 235, 235, 235, 265, 164, 275, 164, 164, 275, 236, - 235, 265, 265, 164, 10, 235, 235, 235, 268, 265, - 265, 166, 147, 166, 275, 275, 147, 169, 150, 218, - 278, 268, 268, 268, 268, 268, 268, 268, 268, 268, + 235, 235, 235, 235, 265, 164, 275, 164, 164, 275, + 236, 235, 265, 265, 164, 10, 235, 235, 235, 268, + 265, 265, 166, 147, 166, 275, 275, 147, 169, 150, + 218, 278, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, - 268, 268, 166, 266, 268, 229, 229, 51, 268, 235, - 159, 275, 13, 15, 17, 60, 140, 154, 159, 228, - 278, 228, 229, 228, 229, 228, 228, 15, 17, 47, - 60, 116, 154, 159, 213, 214, 223, 230, 231, 278, - 165, 248, 249, 278, 11, 247, 257, 149, 10, 11, - 12, 47, 49, 112, 146, 275, 276, 275, 48, 147, - 164, 11, 232, 268, 180, 177, 146, 275, 275, 275, - 275, 275, 172, 146, 268, 155, 10, 11, 193, 232, - 234, 275, 148, 150, 164, 164, 164, 60, 230, 275, - 164, 176, 275, 185, 146, 148, 150, 220, 148, 184, - 275, 276, 236, 167, 166, 166, 166, 166, 166, 166, - 156, 166, 156, 166, 166, 166, 166, 147, 166, 147, - 166, 147, 166, 166, 166, 166, 166, 166, 166, 166, - 166, 166, 166, 268, 235, 265, 275, 156, 166, 166, - 275, 166, 166, 156, 166, 166, 166, 166, 268, 268, - 15, 154, 273, 164, 199, 278, 268, 149, 166, 169, - 166, 166, 166, 228, 159, 275, 228, 228, 228, 228, - 228, 165, 228, 181, 116, 230, 231, 223, 228, 228, - 166, 15, 147, 13, 17, 60, 140, 154, 159, 164, - 226, 276, 278, 13, 15, 17, 60, 140, 154, 159, - 164, 227, 264, 268, 278, 275, 167, 247, 181, 164, - 238, 240, 149, 180, 181, 3, 4, 5, 9, 10, - 15, 50, 62, 67, 75, 76, 108, 110, 112, 117, - 121, 124, 129, 132, 154, 157, 158, 162, 164, 168, - 215, 216, 223, 224, 270, 271, 277, 278, 166, 166, - 172, 146, 147, 147, 147, 147, 167, 253, 147, 166, - 10, 11, 12, 59, 60, 133, 204, 205, 206, 207, - 208, 256, 278, 164, 220, 188, 148, 235, 191, 13, - 159, 192, 51, 268, 230, 13, 17, 60, 140, 154, - 159, 225, 276, 278, 235, 172, 164, 146, 148, 149, - 150, 219, 260, 261, 64, 65, 146, 268, 13, 17, - 60, 111, 140, 154, 159, 164, 186, 209, 211, 276, - 149, 275, 164, 164, 235, 235, 235, 166, 166, 166, - 164, 166, 164, 218, 213, 17, 33, 47, 60, 61, - 76, 106, 109, 112, 128, 140, 154, 212, 278, 268, - 228, 264, 166, 48, 230, 231, 226, 227, 166, 166, - 199, 15, 223, 159, 226, 226, 226, 226, 226, 226, - 165, 218, 159, 275, 227, 227, 227, 227, 227, 227, - 165, 218, 169, 147, 150, 48, 232, 268, 172, 76, - 241, 278, 182, 164, 155, 155, 233, 155, 15, 164, - 155, 164, 268, 268, 268, 268, 235, 266, 268, 166, - 15, 147, 16, 17, 18, 19, 20, 21, 22, 23, - 33, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 163, 164, 165, 180, 180, 167, 254, 10, - 10, 10, 10, 172, 277, 148, 208, 156, 147, 15, - 275, 13, 17, 60, 140, 154, 159, 164, 226, 227, - 189, 211, 148, 213, 159, 209, 213, 166, 166, 225, - 159, 225, 225, 225, 225, 225, 164, 165, 166, 167, - 194, 260, 173, 174, 275, 64, 65, 167, 262, 278, - 148, 148, 146, 221, 222, 268, 278, 148, 159, 209, - 209, 6, 16, 17, 18, 19, 20, 21, 22, 23, - 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 65, 108, 147, 150, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 164, 165, - 168, 200, 209, 209, 209, 209, 149, 164, 165, 212, - 150, 218, 220, 247, 266, 266, 166, 166, 166, 266, - 266, 166, 60, 233, 181, 164, 146, 169, 164, 223, - 226, 227, 218, 218, 164, 164, 212, 226, 166, 264, - 227, 166, 264, 268, 166, 166, 167, 149, 242, 243, - 278, 235, 235, 235, 164, 235, 164, 10, 235, 235, - 235, 268, 166, 166, 15, 224, 268, 268, 268, 268, + 268, 268, 268, 166, 266, 268, 229, 229, 51, 268, + 235, 159, 275, 13, 15, 17, 60, 140, 154, 159, + 228, 278, 228, 229, 228, 229, 228, 228, 15, 17, + 47, 60, 116, 154, 159, 213, 214, 223, 230, 231, + 278, 165, 248, 249, 278, 11, 247, 257, 149, 10, + 11, 12, 47, 49, 112, 146, 275, 276, 275, 48, + 147, 164, 11, 232, 268, 180, 177, 146, 275, 275, + 275, 275, 275, 172, 146, 268, 155, 10, 11, 193, + 232, 234, 275, 148, 150, 164, 164, 164, 60, 230, + 275, 164, 176, 275, 185, 146, 148, 150, 220, 148, + 184, 275, 276, 236, 167, 166, 166, 166, 166, 166, + 166, 156, 166, 156, 166, 166, 166, 166, 147, 166, + 147, 166, 147, 166, 166, 166, 166, 166, 166, 166, + 166, 166, 166, 166, 268, 235, 265, 275, 156, 166, + 166, 275, 166, 166, 156, 166, 166, 166, 166, 268, + 268, 15, 154, 273, 164, 199, 278, 268, 149, 166, + 169, 166, 166, 166, 228, 159, 275, 228, 228, 228, + 228, 228, 165, 228, 181, 116, 230, 231, 223, 228, + 228, 166, 15, 147, 13, 17, 60, 140, 154, 159, + 164, 226, 276, 278, 13, 15, 17, 60, 140, 154, + 159, 164, 227, 264, 268, 278, 275, 167, 247, 181, + 164, 238, 240, 149, 180, 181, 3, 4, 5, 9, + 10, 15, 50, 62, 67, 75, 76, 108, 110, 112, + 117, 121, 124, 129, 132, 154, 157, 158, 162, 164, + 168, 215, 216, 223, 224, 270, 271, 277, 278, 166, + 166, 172, 146, 147, 147, 147, 147, 167, 253, 147, + 166, 10, 11, 12, 59, 60, 133, 204, 205, 206, + 207, 208, 256, 278, 164, 220, 188, 148, 235, 191, + 13, 159, 192, 51, 268, 230, 13, 17, 60, 140, + 154, 159, 225, 276, 278, 235, 172, 164, 146, 148, + 149, 150, 219, 260, 261, 64, 65, 146, 268, 13, + 17, 60, 111, 140, 154, 159, 164, 186, 209, 211, + 276, 149, 275, 164, 164, 235, 235, 235, 166, 166, + 166, 164, 166, 164, 218, 213, 17, 33, 47, 60, + 61, 76, 106, 109, 112, 128, 140, 154, 212, 278, + 268, 228, 264, 166, 48, 230, 231, 226, 227, 166, + 166, 199, 15, 223, 159, 226, 226, 226, 226, 226, + 226, 165, 218, 159, 275, 227, 227, 227, 227, 227, + 227, 165, 218, 169, 147, 150, 48, 232, 268, 172, + 76, 241, 278, 182, 164, 155, 155, 233, 155, 15, + 164, 155, 164, 268, 268, 268, 268, 235, 266, 268, + 166, 15, 147, 16, 17, 18, 19, 20, 21, 22, + 23, 33, 151, 152, 153, 154, 155, 156, 157, 158, + 159, 160, 161, 163, 164, 165, 180, 180, 167, 254, + 10, 10, 10, 10, 172, 277, 148, 208, 156, 147, + 15, 275, 13, 17, 60, 140, 154, 159, 164, 226, + 227, 189, 211, 148, 213, 159, 209, 213, 166, 166, + 225, 159, 225, 225, 225, 225, 225, 164, 165, 166, + 167, 194, 260, 173, 174, 275, 64, 65, 167, 262, + 278, 148, 148, 146, 221, 222, 268, 278, 148, 159, + 209, 209, 6, 16, 17, 18, 19, 20, 21, 22, + 23, 33, 35, 36, 37, 38, 39, 40, 41, 42, + 43, 44, 45, 46, 65, 108, 147, 150, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 164, + 165, 168, 200, 209, 209, 209, 209, 149, 164, 165, + 212, 150, 218, 220, 247, 266, 266, 166, 166, 166, + 266, 266, 166, 60, 233, 181, 164, 146, 169, 164, + 223, 226, 227, 218, 218, 164, 164, 212, 226, 166, + 264, 227, 166, 264, 268, 166, 166, 167, 149, 242, + 243, 278, 235, 235, 235, 164, 235, 164, 10, 235, + 235, 235, 268, 166, 166, 15, 224, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, 268, - 268, 268, 268, 268, 268, 268, 268, 166, 266, 268, - 172, 147, 166, 147, 147, 147, 167, 166, 226, 227, - 178, 183, 201, 202, 207, 275, 150, 159, 150, 217, - 278, 218, 220, 166, 209, 166, 166, 164, 225, 197, - 264, 213, 167, 146, 147, 146, 164, 148, 148, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 70, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 82, 83, 84, 100, 106, - 107, 108, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 168, 169, 263, 221, - 167, 147, 209, 10, 166, 169, 166, 4, 210, 264, - 268, 147, 166, 166, 166, 166, 199, 233, 229, 48, - 166, 275, 260, 213, 218, 218, 213, 213, 164, 169, - 164, 169, 147, 113, 114, 115, 133, 138, 244, 274, - 275, 146, 147, 166, 156, 156, 265, 156, 275, 166, - 166, 156, 166, 166, 268, 149, 166, 169, 167, 10, - 148, 10, 10, 10, 148, 217, 235, 50, 62, 67, - 117, 121, 124, 154, 157, 158, 159, 162, 164, 168, - 267, 269, 147, 199, 166, 164, 199, 198, 213, 169, - 166, 260, 174, 265, 265, 262, 167, 146, 268, 215, - 169, 186, 212, 229, 15, 166, 167, 166, 166, 166, - 213, 213, 138, 274, 138, 274, 138, 274, 275, 113, - 114, 115, 15, 172, 244, 164, 164, 166, 164, 166, - 164, 268, 147, 166, 147, 166, 166, 147, 166, 164, - 155, 155, 155, 15, 164, 155, 267, 267, 267, 267, - 267, 235, 266, 267, 16, 17, 18, 19, 20, 21, - 22, 23, 33, 151, 152, 153, 154, 157, 158, 159, - 160, 161, 163, 164, 165, 189, 164, 195, 213, 166, - 199, 167, 167, 166, 167, 221, 166, 146, 166, 199, - 199, 199, 166, 166, 274, 274, 274, 274, 274, 274, - 167, 266, 266, 266, 266, 10, 148, 10, 148, 148, - 10, 148, 235, 235, 235, 235, 164, 10, 235, 235, - 166, 166, 267, 267, 267, 267, 267, 267, 267, 267, + 268, 268, 268, 268, 268, 268, 268, 268, 166, 266, + 268, 172, 147, 166, 147, 147, 147, 167, 166, 226, + 227, 178, 183, 201, 202, 207, 275, 150, 159, 150, + 217, 278, 218, 220, 166, 209, 166, 166, 164, 225, + 197, 264, 213, 167, 146, 147, 146, 164, 148, 148, + 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 33, 34, 35, 36, 37, 38, 39, 40, + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, + 51, 54, 55, 56, 57, 58, 59, 60, 61, 62, + 63, 64, 65, 66, 67, 68, 70, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 82, 83, 84, 100, + 106, 107, 108, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 168, 169, 263, + 221, 167, 147, 209, 10, 166, 169, 166, 4, 210, + 264, 268, 147, 166, 166, 166, 166, 199, 233, 229, + 48, 166, 275, 260, 213, 218, 218, 213, 213, 164, + 169, 164, 169, 147, 113, 114, 115, 133, 138, 244, + 274, 275, 146, 147, 166, 156, 156, 265, 156, 275, + 166, 166, 156, 166, 166, 268, 149, 166, 169, 167, + 10, 148, 10, 10, 10, 148, 217, 235, 50, 62, + 67, 117, 121, 124, 154, 157, 158, 159, 162, 164, + 168, 267, 269, 147, 199, 166, 164, 199, 198, 213, + 169, 166, 260, 174, 265, 265, 262, 167, 146, 268, + 215, 169, 186, 212, 229, 15, 166, 167, 166, 166, + 166, 213, 213, 138, 274, 138, 274, 138, 274, 275, + 113, 114, 115, 15, 172, 244, 164, 164, 166, 164, + 166, 164, 268, 147, 166, 147, 166, 166, 147, 166, + 164, 155, 155, 155, 15, 164, 155, 267, 267, 267, + 267, 267, 235, 266, 267, 16, 17, 18, 19, 20, + 21, 22, 23, 33, 151, 152, 153, 154, 157, 158, + 159, 160, 161, 163, 164, 165, 189, 164, 195, 213, + 166, 199, 167, 167, 166, 167, 221, 166, 146, 166, + 199, 199, 199, 166, 166, 274, 274, 274, 274, 274, + 274, 167, 266, 266, 266, 266, 10, 148, 10, 148, + 148, 10, 148, 235, 235, 235, 235, 164, 10, 235, + 235, 166, 166, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, 267, - 267, 166, 266, 268, 196, 213, 166, 199, 15, 167, - 199, 260, 212, 212, 212, 199, 199, 166, 166, 166, - 166, 166, 147, 147, 166, 166, 156, 156, 156, 275, - 166, 166, 156, 267, 149, 166, 169, 213, 166, 199, - 167, 148, 10, 10, 148, 164, 164, 164, 166, 164, - 267, 166, 199, 166, 166, 266, 266, 266, 266, 199, - 212, 148, 148, 166, 166, 166, 166, 212 + 267, 267, 166, 266, 268, 196, 213, 166, 199, 15, + 167, 199, 260, 212, 212, 212, 199, 199, 166, 166, + 166, 166, 166, 147, 147, 166, 166, 156, 156, 156, + 275, 166, 166, 156, 267, 149, 166, 169, 213, 166, + 199, 167, 148, 10, 10, 148, 164, 164, 164, 166, + 164, 267, 166, 199, 166, 166, 266, 266, 266, 266, + 199, 212, 148, 148, 166, 166, 166, 166, 212 }; /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ @@ -3109,8 +3119,8 @@ static const yytype_uint16 yyr1[] = 270, 270, 270, 270, 270, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 271, 272, 272, 272, 272, 272, 273, 273, 273, 273, 274, 274, 274, 275, 275, - 275, 275, 275, 275, 275, 275, 275, 275, 276, 276, - 276, 276, 277, 277, 277, 277, 278 + 275, 275, 275, 275, 275, 275, 275, 275, 275, 276, + 276, 276, 276, 277, 277, 277, 277, 278 }; /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ @@ -3191,7 +3201,7 @@ static const yytype_uint8 yyr2[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 3, 1, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 2, 2, 0 + 1, 1, 1, 1, 1, 2, 2, 0 }; @@ -3971,7 +3981,7 @@ yyreduce: { current_expr = (yyvsp[0].u.expr); } -#line 3975 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 3985 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 4: @@ -3979,7 +3989,7 @@ yyreduce: { current_type = (yyvsp[0].u.type); } -#line 3983 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 3993 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 10: @@ -3987,7 +3997,7 @@ yyreduce: { delete (yyvsp[-1].u.expr); } -#line 3991 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4001 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 11: @@ -3995,7 +4005,7 @@ yyreduce: { delete (yyvsp[-2].u.expr); } -#line 3999 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4009 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 12: @@ -4003,7 +4013,7 @@ yyreduce: { delete (yyvsp[-1].u.expr); } -#line 4007 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4017 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 13: @@ -4012,7 +4022,7 @@ yyreduce: push_storage_class((current_storage_class & ~CPPInstance::SC_c_binding) | ((yyvsp[-1].u.integer) & CPPInstance::SC_c_binding)); } -#line 4016 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4026 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 14: @@ -4020,7 +4030,7 @@ yyreduce: { pop_storage_class(); } -#line 4024 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4034 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 21: @@ -4037,7 +4047,7 @@ yyreduce: publish_nest_level++; current_scope->set_current_vis(V_published); } -#line 4041 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4051 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 22: @@ -4050,7 +4060,7 @@ yyreduce: } publish_nest_level = 0; } -#line 4054 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4064 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 23: @@ -4058,7 +4068,7 @@ yyreduce: { current_scope->set_current_vis(V_published); } -#line 4062 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4072 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 24: @@ -4070,7 +4080,7 @@ yyreduce: current_scope->set_current_vis(V_public); } } -#line 4074 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4084 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 25: @@ -4078,7 +4088,7 @@ yyreduce: { current_scope->set_current_vis(V_protected); } -#line 4082 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4092 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 26: @@ -4086,7 +4096,7 @@ yyreduce: { current_scope->set_current_vis(V_private); } -#line 4090 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4100 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 27: @@ -4101,7 +4111,7 @@ yyreduce: CPPMakeProperty *make_property = new CPPMakeProperty((yyvsp[-4].u.identifier), getter->as_function_group(), NULL, current_scope, (yylsp[-6]).file); current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-6])); } -#line 4105 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4115 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 28: @@ -4126,7 +4136,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8])); } } -#line 4130 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4140 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 29: @@ -4160,7 +4170,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-10])); } } -#line 4164 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4174 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 30: @@ -4181,7 +4191,7 @@ yyreduce: make_property->_length_function = length_getter->as_function_group(); current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8])); } -#line 4185 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4195 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 31: @@ -4213,7 +4223,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-10])); } } -#line 4217 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4227 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 32: @@ -4254,7 +4264,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-12])); } } -#line 4258 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4268 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 33: @@ -4280,7 +4290,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-8])); } } -#line 4284 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4294 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 34: @@ -4317,7 +4327,7 @@ yyreduce: current_scope->add_declaration(make_property, global_scope, current_lexer, (yylsp[-12])); } } -#line 4321 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4331 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 35: @@ -4343,7 +4353,7 @@ yyreduce: current_scope->add_declaration(make_seq, global_scope, current_lexer, (yylsp[-8])); } } -#line 4347 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4357 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 36: @@ -4358,7 +4368,7 @@ yyreduce: yywarning("static_assert failed: " + str.str(), (yylsp[-4])); } } -#line 4362 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4372 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 37: @@ -4372,7 +4382,7 @@ yyreduce: yywarning("static_assert failed", (yylsp[-2])); } } -#line 4376 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4386 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 38: @@ -4382,7 +4392,7 @@ yyreduce: V_public); push_scope(new_scope); } -#line 4386 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 39: @@ -4391,7 +4401,7 @@ yyreduce: delete current_scope; pop_scope(); } -#line 4395 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4405 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 40: @@ -4399,7 +4409,7 @@ yyreduce: { (yyval.u.integer) = 0; } -#line 4403 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4413 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 41: @@ -4408,7 +4418,7 @@ yyreduce: // This isn't really a storage class, but it helps with parsing. (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_const; } -#line 4412 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4422 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 42: @@ -4416,7 +4426,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_extern; } -#line 4420 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4430 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 43: @@ -4431,7 +4441,7 @@ yyreduce: yywarning("Ignoring unknown linkage type \"" + (yyvsp[-1].str) + "\"", (yylsp[-1])); } } -#line 4435 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4445 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 44: @@ -4439,7 +4449,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_static; } -#line 4443 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4453 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 45: @@ -4447,7 +4457,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_inline; } -#line 4451 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4461 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 46: @@ -4455,7 +4465,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_virtual; } -#line 4459 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4469 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 47: @@ -4463,7 +4473,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_explicit; } -#line 4467 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4477 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 48: @@ -4471,7 +4481,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_register; } -#line 4475 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4485 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 49: @@ -4479,7 +4489,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_volatile; } -#line 4483 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4493 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 50: @@ -4487,7 +4497,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_mutable; } -#line 4491 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4501 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 51: @@ -4495,7 +4505,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_constexpr; } -#line 4499 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4509 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 52: @@ -4503,7 +4513,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_blocking; } -#line 4507 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4517 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 53: @@ -4511,7 +4521,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_extension; } -#line 4515 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4525 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 54: @@ -4519,7 +4529,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer) | (int)CPPInstance::SC_thread_local; } -#line 4523 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4533 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 55: @@ -4528,7 +4538,7 @@ yyreduce: // Ignore attribute specifiers for now. (yyval.u.integer) = (yyvsp[0].u.integer); } -#line 4532 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4542 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 56: @@ -4536,7 +4546,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer); } -#line 4540 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4550 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 57: @@ -4544,7 +4554,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[0].u.integer); } -#line 4548 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4558 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 63: @@ -4559,7 +4569,7 @@ yyreduce: } push_storage_class((yyvsp[-1].u.integer)); } -#line 4563 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4573 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 64: @@ -4567,7 +4577,7 @@ yyreduce: { pop_storage_class(); } -#line 4571 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4581 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 65: @@ -4580,7 +4590,7 @@ yyreduce: current_scope->add_declaration((yyvsp[-1].u.decl), global_scope, current_lexer, (yylsp[-1])); } -#line 4584 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4594 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 66: @@ -4593,7 +4603,7 @@ yyreduce: (yyvsp[0].u.instance)->_storage_class |= (current_storage_class | (yyvsp[-1].u.integer)); } } -#line 4597 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4607 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 67: @@ -4605,7 +4615,7 @@ yyreduce: (yyvsp[-2].u.instance)->set_initializer((yyvsp[0].u.expr)); } } -#line 4609 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4619 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 68: @@ -4617,7 +4627,7 @@ yyreduce: (yyvsp[-1].u.instance)->set_initializer((yyvsp[0].u.expr)); } } -#line 4621 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4631 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 70: @@ -4632,7 +4642,7 @@ yyreduce: inst->set_initializer((yyvsp[0].u.expr)); current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[-1])); } -#line 4636 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4646 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 71: @@ -4647,7 +4657,7 @@ yyreduce: inst->set_initializer((yyvsp[-2].u.expr)); current_scope->add_declaration(inst, global_scope, current_lexer, (yylsp[-3])); } -#line 4651 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4661 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 72: @@ -4662,7 +4672,7 @@ yyreduce: } push_storage_class((yyvsp[-1].u.integer)); } -#line 4666 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4676 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 73: @@ -4670,7 +4680,7 @@ yyreduce: { pop_storage_class(); } -#line 4674 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4684 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 74: @@ -4686,7 +4696,7 @@ yyreduce: } } } -#line 4690 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4700 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 75: @@ -4699,7 +4709,7 @@ yyreduce: CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[-1].u.inst_ident), current_scope, (yylsp[-1]).file); current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-1])); } -#line 4703 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4713 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 76: @@ -4712,7 +4722,7 @@ yyreduce: CPPTypedefType *typedef_type = new CPPTypedefType(target_type, (yyvsp[-3].u.inst_ident), current_scope, (yylsp[-3]).file); current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-3])); } -#line 4716 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4726 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 77: @@ -4720,7 +4730,7 @@ yyreduce: { push_scope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope)); } -#line 4724 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4734 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 78: @@ -4744,7 +4754,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-5]).file); } -#line 4748 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4758 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 79: @@ -4752,7 +4762,7 @@ yyreduce: { push_scope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope)); } -#line 4756 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4766 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 80: @@ -4774,7 +4784,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-5]).file); } -#line 4778 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4788 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 81: @@ -4782,7 +4792,7 @@ yyreduce: { push_scope((yyvsp[-1].u.identifier)->get_scope(current_scope, global_scope)); } -#line 4786 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4796 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 82: @@ -4805,7 +4815,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-5]).file); } } -#line 4809 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4819 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 83: @@ -4813,7 +4823,7 @@ yyreduce: { push_scope((yyvsp[-2].u.inst_ident)->get_scope(current_scope, global_scope)); } -#line 4817 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4827 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 84: @@ -4831,7 +4841,7 @@ yyreduce: ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer)); (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-10]).file); } -#line 4835 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4845 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 85: @@ -4839,7 +4849,7 @@ yyreduce: { push_scope((yyvsp[-2].u.inst_ident)->get_scope(current_scope, global_scope)); } -#line 4843 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4853 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 86: @@ -4857,7 +4867,7 @@ yyreduce: ii->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer)); (yyval.u.instance) = new CPPInstance(type, ii, 0, (yylsp[-11]).file); } -#line 4861 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4871 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 87: @@ -4867,7 +4877,7 @@ yyreduce: push_scope((yyvsp[-3].u.identifier)->get_scope(current_scope, global_scope)); } } -#line 4871 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4881 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 88: @@ -4896,7 +4906,7 @@ yyreduce: (yyval.u.instance) = CPPInstance::make_typecast_function (new CPPInstance((yyvsp[-6].u.type), (yyvsp[-5].u.inst_ident), 0, (yylsp[-5]).file), ident, (yyvsp[-2].u.param_list), (yyvsp[0].u.integer)); } -#line 4900 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4910 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 89: @@ -4906,7 +4916,7 @@ yyreduce: push_scope((yyvsp[-4].u.identifier)->get_scope(current_scope, global_scope)); } } -#line 4910 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4920 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 90: @@ -4926,7 +4936,7 @@ yyreduce: (yyval.u.instance) = CPPInstance::make_typecast_function (new CPPInstance((yyvsp[-6].u.type), (yyvsp[-5].u.inst_ident), 0, (yylsp[-5]).file), ident, (yyvsp[-2].u.param_list), (yyvsp[0].u.integer)); } -#line 4930 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4940 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 91: @@ -4940,7 +4950,7 @@ yyreduce: (yyval.u.instance) = (CPPInstance *)NULL; } } -#line 4944 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4954 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 92: @@ -4948,7 +4958,7 @@ yyreduce: { (yyval.u.integer) = 0; } -#line 4952 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4962 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 93: @@ -4956,7 +4966,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_const_method; } -#line 4960 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4970 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 94: @@ -4964,7 +4974,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_volatile_method; } -#line 4968 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4978 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 95: @@ -4972,7 +4982,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_noexcept; } -#line 4976 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4986 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 96: @@ -4980,7 +4990,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_final; } -#line 4984 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 4994 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 97: @@ -4988,7 +4998,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_override; } -#line 4992 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5002 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 98: @@ -4996,7 +5006,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_lvalue_method; } -#line 5000 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5010 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 99: @@ -5004,7 +5014,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-1].u.integer) | (int)CPPFunctionType::F_rvalue_method; } -#line 5008 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5018 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 100: @@ -5013,7 +5023,7 @@ yyreduce: // Used for lambdas, currently ignored. (yyval.u.integer) = (yyvsp[-1].u.integer); } -#line 5017 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5027 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 101: @@ -5022,7 +5032,7 @@ yyreduce: // Used for lambdas in C++17, currently ignored. (yyval.u.integer) = (yyvsp[-1].u.integer); } -#line 5026 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5036 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 102: @@ -5030,7 +5040,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-3].u.integer); } -#line 5034 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5044 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 103: @@ -5038,7 +5048,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-4].u.integer); } -#line 5042 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5052 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 104: @@ -5046,7 +5056,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-5].u.integer); } -#line 5050 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5060 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 105: @@ -5054,7 +5064,7 @@ yyreduce: { (yyval.u.integer) = (yyvsp[-3].u.integer); } -#line 5058 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5068 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 106: @@ -5062,7 +5072,7 @@ yyreduce: { (yyval.str) = "!"; } -#line 5066 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5076 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 107: @@ -5070,7 +5080,7 @@ yyreduce: { (yyval.str) = "~"; } -#line 5074 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5084 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 108: @@ -5078,7 +5088,7 @@ yyreduce: { (yyval.str) = "*"; } -#line 5082 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5092 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 109: @@ -5086,7 +5096,7 @@ yyreduce: { (yyval.str) = "/"; } -#line 5090 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5100 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 110: @@ -5094,7 +5104,7 @@ yyreduce: { (yyval.str) = "%"; } -#line 5098 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5108 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 111: @@ -5102,7 +5112,7 @@ yyreduce: { (yyval.str) = "+"; } -#line 5106 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5116 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 112: @@ -5110,7 +5120,7 @@ yyreduce: { (yyval.str) = "-"; } -#line 5114 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5124 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 113: @@ -5118,7 +5128,7 @@ yyreduce: { (yyval.str) = "|"; } -#line 5122 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5132 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 114: @@ -5126,7 +5136,7 @@ yyreduce: { (yyval.str) = "&"; } -#line 5130 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5140 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 115: @@ -5134,7 +5144,7 @@ yyreduce: { (yyval.str) = "^"; } -#line 5138 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5148 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 116: @@ -5142,7 +5152,7 @@ yyreduce: { (yyval.str) = "||"; } -#line 5146 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5156 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 117: @@ -5150,7 +5160,7 @@ yyreduce: { (yyval.str) = "&&"; } -#line 5154 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5164 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 118: @@ -5158,7 +5168,7 @@ yyreduce: { (yyval.str) = "=="; } -#line 5162 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5172 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 119: @@ -5166,7 +5176,7 @@ yyreduce: { (yyval.str) = "!="; } -#line 5170 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5180 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 120: @@ -5174,7 +5184,7 @@ yyreduce: { (yyval.str) = "<="; } -#line 5178 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5188 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 121: @@ -5182,7 +5192,7 @@ yyreduce: { (yyval.str) = ">="; } -#line 5186 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5196 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 122: @@ -5190,7 +5200,7 @@ yyreduce: { (yyval.str) = "<"; } -#line 5194 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5204 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 123: @@ -5198,7 +5208,7 @@ yyreduce: { (yyval.str) = ">"; } -#line 5202 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5212 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 124: @@ -5206,7 +5216,7 @@ yyreduce: { (yyval.str) = "<<"; } -#line 5210 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5220 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 125: @@ -5214,7 +5224,7 @@ yyreduce: { (yyval.str) = ">>"; } -#line 5218 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5228 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 126: @@ -5222,7 +5232,7 @@ yyreduce: { (yyval.str) = "="; } -#line 5226 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5236 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 127: @@ -5230,7 +5240,7 @@ yyreduce: { (yyval.str) = ","; } -#line 5234 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5244 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 128: @@ -5238,7 +5248,7 @@ yyreduce: { (yyval.str) = "++"; } -#line 5242 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5252 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 129: @@ -5246,7 +5256,7 @@ yyreduce: { (yyval.str) = "--"; } -#line 5250 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5260 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 130: @@ -5254,7 +5264,7 @@ yyreduce: { (yyval.str) = "*="; } -#line 5258 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5268 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 131: @@ -5262,7 +5272,7 @@ yyreduce: { (yyval.str) = "/="; } -#line 5266 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5276 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 132: @@ -5270,7 +5280,7 @@ yyreduce: { (yyval.str) = "%="; } -#line 5274 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5284 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 133: @@ -5278,7 +5288,7 @@ yyreduce: { (yyval.str) = "+="; } -#line 5282 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5292 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 134: @@ -5286,7 +5296,7 @@ yyreduce: { (yyval.str) = "-="; } -#line 5290 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5300 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 135: @@ -5294,7 +5304,7 @@ yyreduce: { (yyval.str) = "|="; } -#line 5298 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5308 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 136: @@ -5302,7 +5312,7 @@ yyreduce: { (yyval.str) = "&="; } -#line 5306 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5316 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 137: @@ -5310,7 +5320,7 @@ yyreduce: { (yyval.str) = "^="; } -#line 5314 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5324 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 138: @@ -5318,7 +5328,7 @@ yyreduce: { (yyval.str) = "<<="; } -#line 5322 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5332 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 139: @@ -5326,7 +5336,7 @@ yyreduce: { (yyval.str) = ">>="; } -#line 5330 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5340 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 140: @@ -5334,7 +5344,7 @@ yyreduce: { (yyval.str) = "->"; } -#line 5338 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5348 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 141: @@ -5342,7 +5352,7 @@ yyreduce: { (yyval.str) = "[]"; } -#line 5346 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5356 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 142: @@ -5350,7 +5360,7 @@ yyreduce: { (yyval.str) = "()"; } -#line 5354 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5364 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 143: @@ -5358,7 +5368,7 @@ yyreduce: { (yyval.str) = "new"; } -#line 5362 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5372 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 144: @@ -5366,7 +5376,7 @@ yyreduce: { (yyval.str) = "delete"; } -#line 5370 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5380 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 149: @@ -5374,7 +5384,7 @@ yyreduce: { push_scope(new CPPTemplateScope(current_scope)); } -#line 5378 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5388 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 150: @@ -5382,7 +5392,7 @@ yyreduce: { pop_scope(); } -#line 5386 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 155: @@ -5392,7 +5402,7 @@ yyreduce: assert(ts != NULL); ts->add_template_parameter((yyvsp[0].u.decl)); } -#line 5396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5406 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 156: @@ -5402,7 +5412,7 @@ yyreduce: assert(ts != NULL); ts->add_template_parameter((yyvsp[0].u.decl)); } -#line 5406 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5416 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 159: @@ -5410,7 +5420,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((CPPIdentifier *)NULL)); } -#line 5414 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5424 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 160: @@ -5418,7 +5428,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[0].u.identifier))); } -#line 5422 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5432 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 161: @@ -5426,7 +5436,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPClassTemplateParameter((yyvsp[-2].u.identifier), (yyvsp[0].u.type))); } -#line 5430 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5440 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 162: @@ -5436,7 +5446,7 @@ yyreduce: ctp->_packed = true; (yyval.u.decl) = CPPType::new_type(ctp); } -#line 5440 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5450 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 163: @@ -5446,7 +5456,7 @@ yyreduce: ctp->_packed = true; (yyval.u.decl) = CPPType::new_type(ctp); } -#line 5450 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5460 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 164: @@ -5456,7 +5466,7 @@ yyreduce: inst->set_initializer((yyvsp[0].u.expr)); (yyval.u.decl) = inst; } -#line 5460 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5470 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 165: @@ -5467,7 +5477,7 @@ yyreduce: inst->set_initializer((yyvsp[0].u.expr)); (yyval.u.decl) = inst; } -#line 5471 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5481 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 166: @@ -5476,7 +5486,7 @@ yyreduce: CPPInstance *inst = new CPPInstance((yyvsp[-1].u.type), (yyvsp[0].u.inst_ident), 0, (yylsp[0]).file); (yyval.u.decl) = inst; } -#line 5480 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5490 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 167: @@ -5486,7 +5496,7 @@ yyreduce: CPPInstance *inst = new CPPInstance((yyvsp[-1].u.type), (yyvsp[0].u.inst_ident), 0, (yylsp[0]).file); (yyval.u.decl) = inst; } -#line 5490 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5500 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 168: @@ -5494,7 +5504,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type)); } -#line 5498 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5508 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 169: @@ -5503,7 +5513,7 @@ yyreduce: yywarning("Not a type: " + (yyvsp[0].u.identifier)->get_fully_scoped_name(), (yylsp[0])); (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } -#line 5507 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5517 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 170: @@ -5515,7 +5525,7 @@ yyreduce: } assert((yyval.u.type) != NULL); } -#line 5519 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5529 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 171: @@ -5527,7 +5537,7 @@ yyreduce: } assert((yyval.u.type) != NULL); } -#line 5531 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5541 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 172: @@ -5535,7 +5545,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); } -#line 5539 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5549 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 173: @@ -5553,7 +5563,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier(ident); } -#line 5557 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5567 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 174: @@ -5572,7 +5582,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier(ident); } -#line 5576 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5586 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 175: @@ -5581,7 +5591,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 5585 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5595 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 176: @@ -5590,7 +5600,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 5594 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5604 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 177: @@ -5599,7 +5609,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 5603 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5613 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 178: @@ -5608,7 +5618,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 5612 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5622 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 179: @@ -5617,7 +5627,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 5621 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5631 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 180: @@ -5626,7 +5636,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 5630 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5640 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 181: @@ -5635,7 +5645,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 5639 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5649 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 182: @@ -5644,7 +5654,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } -#line 5648 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5658 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 183: @@ -5661,7 +5671,7 @@ yyreduce: push_scope(scope); } -#line 5665 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5675 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 184: @@ -5679,7 +5689,7 @@ yyreduce: (yyval.u.inst_ident)->add_func_modifier((yyvsp[-2].u.param_list), (yyvsp[0].u.integer)); } } -#line 5683 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5693 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 185: @@ -5693,7 +5703,7 @@ yyreduce: } (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident); } -#line 5697 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5707 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 186: @@ -5703,7 +5713,7 @@ yyreduce: (yyvsp[-2].u.inst_ident)->_bit_width = (yyvsp[0].u.integer); (yyval.u.inst_ident) = (yyvsp[-2].u.inst_ident); } -#line 5707 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5717 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 187: @@ -5711,7 +5721,7 @@ yyreduce: { (yyval.u.type) = NULL; } -#line 5715 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5725 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 188: @@ -5719,7 +5729,7 @@ yyreduce: { (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 5723 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5733 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 189: @@ -5728,7 +5738,7 @@ yyreduce: (yyvsp[0].u.inst_ident)->add_modifier(IIT_const); (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 5732 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5742 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 190: @@ -5736,7 +5746,7 @@ yyreduce: { (yyval.u.param_list) = new CPPParameterList; } -#line 5740 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5750 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 191: @@ -5745,7 +5755,7 @@ yyreduce: (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5749 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5759 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 192: @@ -5753,7 +5763,7 @@ yyreduce: { (yyval.u.param_list) = (yyvsp[0].u.param_list); } -#line 5757 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5767 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 193: @@ -5762,7 +5772,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-2].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5766 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5776 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 194: @@ -5771,7 +5781,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-1].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5775 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5785 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 195: @@ -5780,7 +5790,7 @@ yyreduce: (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance)); } -#line 5784 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5794 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 196: @@ -5789,7 +5799,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-2].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance)); } -#line 5793 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5803 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 197: @@ -5797,7 +5807,7 @@ yyreduce: { (yyval.u.param_list) = new CPPParameterList; } -#line 5801 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5811 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 198: @@ -5806,7 +5816,7 @@ yyreduce: (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5810 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5820 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 199: @@ -5814,7 +5824,7 @@ yyreduce: { (yyval.u.param_list) = (yyvsp[0].u.param_list); } -#line 5818 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5828 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 200: @@ -5823,7 +5833,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-2].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5827 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5837 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 201: @@ -5832,7 +5842,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-1].u.param_list); (yyval.u.param_list)->_includes_ellipsis = true; } -#line 5836 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5846 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 202: @@ -5841,7 +5851,7 @@ yyreduce: (yyval.u.param_list) = new CPPParameterList; (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance)); } -#line 5845 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5855 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 203: @@ -5850,7 +5860,7 @@ yyreduce: (yyval.u.param_list) = (yyvsp[-2].u.param_list); (yyval.u.param_list)->_parameters.push_back((yyvsp[0].u.instance)); } -#line 5854 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5864 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 204: @@ -5858,7 +5868,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5862 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5872 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 205: @@ -5866,7 +5876,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 5870 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5880 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 206: @@ -5874,7 +5884,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5878 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5888 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 207: @@ -5882,7 +5892,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 5886 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5896 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 208: @@ -5890,7 +5900,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5894 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5904 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 209: @@ -5898,7 +5908,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5902 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5912 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 210: @@ -5906,7 +5916,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5910 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5920 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 211: @@ -5914,7 +5924,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_default()); } -#line 5918 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5928 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 212: @@ -5922,7 +5932,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_delete()); } -#line 5926 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5936 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 213: @@ -5930,7 +5940,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5934 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5944 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 214: @@ -5938,7 +5948,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5942 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5952 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 215: @@ -5946,7 +5956,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[-1].u.expr); } -#line 5950 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5960 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 216: @@ -5954,7 +5964,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_default()); } -#line 5958 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5968 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 217: @@ -5962,7 +5972,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_delete()); } -#line 5966 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5976 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 218: @@ -5970,14 +5980,14 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 5974 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5984 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 222: #line 1884 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { } -#line 5981 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 5991 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 226: @@ -5986,7 +5996,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 5990 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6000 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 227: @@ -5996,7 +6006,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6000 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6010 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 228: @@ -6006,7 +6016,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-2]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6010 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6020 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 229: @@ -6015,7 +6025,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6019 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6029 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 230: @@ -6025,7 +6035,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-1]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6029 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6039 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 231: @@ -6035,7 +6045,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance((yyvsp[-2].u.type), (yyvsp[-1].u.inst_ident), 0, (yylsp[-2]).file); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6039 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6049 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 232: @@ -6043,7 +6053,7 @@ yyreduce: { (yyval.u.instance) = (yyvsp[0].u.instance); } -#line 6047 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6057 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 233: @@ -6051,7 +6061,7 @@ yyreduce: { (yyval.u.instance) = (yyvsp[0].u.instance); } -#line 6055 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6065 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 234: @@ -6059,7 +6069,7 @@ yyreduce: { (yyval.u.instance) = (yyvsp[0].u.instance); } -#line 6063 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6073 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 235: @@ -6070,7 +6080,7 @@ yyreduce: (yyval.u.instance) = new CPPInstance(type, "expr"); (yyval.u.instance)->set_initializer((yyvsp[0].u.expr)); } -#line 6074 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6084 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 236: @@ -6078,7 +6088,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } -#line 6082 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6092 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 237: @@ -6086,7 +6096,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); } -#line 6090 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6100 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 238: @@ -6095,7 +6105,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 6099 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6109 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 239: @@ -6104,7 +6114,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 6108 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6118 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 240: @@ -6113,7 +6123,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 6117 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6127 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 241: @@ -6122,7 +6132,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 6126 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6136 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 242: @@ -6131,7 +6141,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 6135 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6145 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 243: @@ -6140,7 +6150,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 6144 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6154 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 244: @@ -6149,7 +6159,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 6153 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6163 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 245: @@ -6157,7 +6167,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } -#line 6161 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6171 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 246: @@ -6165,7 +6175,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); } -#line 6169 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6179 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 247: @@ -6174,7 +6184,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 6178 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6188 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 248: @@ -6183,7 +6193,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 6187 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6197 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 249: @@ -6192,7 +6202,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 6196 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6206 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 250: @@ -6201,7 +6211,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 6205 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6215 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 251: @@ -6210,7 +6220,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 6214 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6224 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 252: @@ -6219,7 +6229,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 6223 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6233 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 253: @@ -6228,7 +6238,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 6232 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6242 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 254: @@ -6238,7 +6248,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-2].u.param_list), (yyvsp[0].u.integer)); } -#line 6242 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6252 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 255: @@ -6247,7 +6257,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } -#line 6251 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6261 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 256: @@ -6256,7 +6266,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); (yyval.u.inst_ident)->_packed = true; } -#line 6260 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6270 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 257: @@ -6265,7 +6275,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); (yyval.u.inst_ident)->_packed = true; } -#line 6269 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6279 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 258: @@ -6274,7 +6284,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 6278 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6288 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 259: @@ -6283,7 +6293,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 6287 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6297 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 260: @@ -6292,7 +6302,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 6296 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6306 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 261: @@ -6301,7 +6311,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 6305 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6315 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 262: @@ -6310,7 +6320,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 6314 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6324 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 263: @@ -6319,7 +6329,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 6323 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6333 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 264: @@ -6328,7 +6338,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 6332 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6342 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 265: @@ -6338,7 +6348,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-2].u.param_list), (yyvsp[0].u.integer)); } -#line 6342 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6352 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 266: @@ -6347,7 +6357,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-1].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_paren); } -#line 6351 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6361 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 267: @@ -6355,7 +6365,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } -#line 6359 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6369 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 268: @@ -6364,7 +6374,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); (yyval.u.inst_ident)->_packed = true; } -#line 6368 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6378 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 269: @@ -6373,7 +6383,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); (yyval.u.inst_ident)->_packed = true; } -#line 6377 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6387 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 270: @@ -6382,7 +6392,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 6386 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 271: @@ -6391,7 +6401,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 6395 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6405 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 272: @@ -6400,7 +6410,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 6404 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6414 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 273: @@ -6409,7 +6419,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 6413 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6423 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 274: @@ -6418,7 +6428,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 6422 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6432 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 275: @@ -6427,7 +6437,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 6431 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6441 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 276: @@ -6436,7 +6446,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 6440 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6450 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 277: @@ -6444,7 +6454,7 @@ yyreduce: { (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); } -#line 6448 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6458 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 278: @@ -6453,7 +6463,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((CPPIdentifier *)NULL); (yyval.u.inst_ident)->_packed = true; } -#line 6457 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6467 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 279: @@ -6462,7 +6472,7 @@ yyreduce: (yyval.u.inst_ident) = new CPPInstanceIdentifier((yyvsp[0].u.identifier)); (yyval.u.inst_ident)->_packed = true; } -#line 6466 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6476 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 280: @@ -6471,7 +6481,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_const); } -#line 6475 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6485 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 281: @@ -6480,7 +6490,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_volatile); } -#line 6484 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6494 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 282: @@ -6489,7 +6499,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_pointer); } -#line 6493 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6503 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 283: @@ -6498,7 +6508,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_reference); } -#line 6502 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6512 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 284: @@ -6507,7 +6517,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_modifier(IIT_rvalue_reference); } -#line 6511 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6521 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 285: @@ -6516,7 +6526,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[0].u.inst_ident); (yyval.u.inst_ident)->add_scoped_pointer_modifier((yyvsp[-2].u.identifier)); } -#line 6520 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6530 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 286: @@ -6525,7 +6535,7 @@ yyreduce: (yyval.u.inst_ident) = (yyvsp[-3].u.inst_ident); (yyval.u.inst_ident)->add_array_modifier((yyvsp[-1].u.expr)); } -#line 6529 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6539 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 287: @@ -6535,7 +6545,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), (yyvsp[0].u.type)); } -#line 6539 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6549 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 288: @@ -6546,7 +6556,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), (yyvsp[0].u.type)); } -#line 6550 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6560 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 289: @@ -6557,7 +6567,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), (yyvsp[0].u.type)); } -#line 6561 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6571 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 290: @@ -6568,7 +6578,7 @@ yyreduce: (yyval.u.inst_ident)->add_modifier(IIT_paren); (yyval.u.inst_ident)->add_func_modifier((yyvsp[-3].u.param_list), (yyvsp[-1].u.integer), (yyvsp[0].u.type)); } -#line 6572 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6582 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 291: @@ -6576,7 +6586,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type)); } -#line 6580 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6590 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 292: @@ -6588,7 +6598,7 @@ yyreduce: } assert((yyval.u.type) != NULL); } -#line 6592 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6602 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 293: @@ -6596,7 +6606,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier))); } -#line 6600 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6610 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 294: @@ -6604,7 +6614,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.struct_type)); } -#line 6608 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6618 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 295: @@ -6612,7 +6622,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.struct_type)); } -#line 6616 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6626 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 296: @@ -6620,7 +6630,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.enum_type)); } -#line 6624 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6634 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 297: @@ -6640,7 +6650,7 @@ yyreduce: (yyval.u.type) = et; } } -#line 6644 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6654 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 298: @@ -6660,7 +6670,7 @@ yyreduce: (yyval.u.type) = et; } } -#line 6664 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6674 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 299: @@ -6673,7 +6683,7 @@ yyreduce: yyerror("could not determine type of " + str.str(), (yylsp[-1])); } } -#line 6677 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6687 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 300: @@ -6681,7 +6691,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto)); } -#line 6685 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6695 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 301: @@ -6695,7 +6705,7 @@ yyreduce: (yyval.u.type) = enum_type->get_underlying_type(); } } -#line 6699 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6709 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 302: @@ -6703,7 +6713,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto)); } -#line 6707 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6717 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 303: @@ -6715,7 +6725,7 @@ yyreduce: } assert((yyval.u.type) != NULL); } -#line 6719 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6729 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 304: @@ -6723,7 +6733,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type((yyvsp[0].u.simple_type)); } -#line 6727 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6737 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 305: @@ -6735,7 +6745,7 @@ yyreduce: } assert((yyval.u.decl) != NULL); } -#line 6739 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6749 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 306: @@ -6743,7 +6753,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier))); } -#line 6747 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6757 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 307: @@ -6751,7 +6761,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type((yyvsp[0].u.struct_type)); } -#line 6755 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6765 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 308: @@ -6759,7 +6769,7 @@ yyreduce: { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[0].u.struct_type))); } -#line 6763 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6773 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 309: @@ -6767,7 +6777,7 @@ yyreduce: { (yyval.u.decl) = new CPPTypeDeclaration(CPPType::new_type((yyvsp[0].u.enum_type))); } -#line 6771 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6781 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 310: @@ -6787,7 +6797,7 @@ yyreduce: (yyval.u.decl) = et; } } -#line 6791 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6801 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 311: @@ -6807,7 +6817,7 @@ yyreduce: (yyval.u.decl) = et; } } -#line 6811 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6821 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 312: @@ -6829,7 +6839,7 @@ yyreduce: (yyval.u.decl) = et; } } -#line 6833 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6843 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 313: @@ -6842,7 +6852,7 @@ yyreduce: yyerror("could not determine type of " + str.str(), (yylsp[-1])); } } -#line 6846 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6856 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 314: @@ -6850,7 +6860,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto)); } -#line 6854 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6864 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 315: @@ -6864,7 +6874,7 @@ yyreduce: (yyval.u.decl) = enum_type->get_underlying_type(); } } -#line 6868 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6878 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 316: @@ -6872,7 +6882,7 @@ yyreduce: { (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto)); } -#line 6876 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6886 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 317: @@ -6880,7 +6890,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type)); } -#line 6884 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6894 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 318: @@ -6892,7 +6902,7 @@ yyreduce: } assert((yyval.u.type) != NULL); } -#line 6896 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6906 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 319: @@ -6900,7 +6910,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier))); } -#line 6904 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6914 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 320: @@ -6920,7 +6930,7 @@ yyreduce: (yyval.u.type) = et; } } -#line 6924 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6934 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 321: @@ -6940,7 +6950,7 @@ yyreduce: (yyval.u.type) = et; } } -#line 6944 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6954 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 322: @@ -6953,7 +6963,7 @@ yyreduce: yyerror("could not determine type of " + str.str(), (yylsp[-1])); } } -#line 6957 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6967 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 323: @@ -6967,7 +6977,7 @@ yyreduce: (yyval.u.type) = enum_type->get_underlying_type(); } } -#line 6971 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6981 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 324: @@ -6975,7 +6985,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_auto)); } -#line 6979 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6989 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 325: @@ -6983,7 +6993,7 @@ yyreduce: { (yyval.u.decl) = (yyvsp[0].u.decl); } -#line 6987 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 6997 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 326: @@ -6993,7 +7003,7 @@ yyreduce: (yyval.u.decl) = CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_unknown)); } -#line 6997 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7007 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 327: @@ -7001,7 +7011,7 @@ yyreduce: { (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 7005 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7015 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 328: @@ -7010,7 +7020,7 @@ yyreduce: (yyvsp[0].u.inst_ident)->add_modifier(IIT_const); (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 7014 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7024 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 329: @@ -7018,7 +7028,7 @@ yyreduce: { (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 7022 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7032 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 330: @@ -7027,7 +7037,7 @@ yyreduce: (yyvsp[0].u.inst_ident)->add_modifier(IIT_const); (yyval.u.type) = (yyvsp[0].u.inst_ident)->unroll_type((yyvsp[-1].u.type)); } -#line 7031 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7041 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 335: @@ -7045,7 +7055,7 @@ yyreduce: push_scope(new_scope); push_struct(st); } -#line 7049 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7059 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 336: @@ -7056,7 +7066,7 @@ yyreduce: pop_struct(); pop_scope(); } -#line 7060 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7070 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 337: @@ -7080,7 +7090,7 @@ yyreduce: push_scope(new_scope); push_struct(st); } -#line 7084 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7094 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 338: @@ -7091,7 +7101,7 @@ yyreduce: pop_struct(); pop_scope(); } -#line 7095 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7105 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 340: @@ -7099,7 +7109,7 @@ yyreduce: { current_struct->_final = true; } -#line 7103 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7113 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 345: @@ -7107,7 +7117,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_unknown, false); } -#line 7111 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7121 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 346: @@ -7115,7 +7125,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_public, false); } -#line 7119 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7129 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 347: @@ -7123,7 +7133,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_protected, false); } -#line 7127 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7137 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 348: @@ -7131,7 +7141,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_private, false); } -#line 7135 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7145 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 349: @@ -7139,7 +7149,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_public, true); } -#line 7143 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7153 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 350: @@ -7147,7 +7157,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_protected, true); } -#line 7151 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7161 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 351: @@ -7155,7 +7165,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_private, true); } -#line 7159 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7169 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 352: @@ -7163,7 +7173,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_public, true); } -#line 7167 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7177 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 353: @@ -7171,7 +7181,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_protected, true); } -#line 7175 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7185 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 354: @@ -7179,7 +7189,7 @@ yyreduce: { current_struct->append_derivation((yyvsp[0].u.type), V_private, true); } -#line 7183 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7193 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 355: @@ -7188,7 +7198,7 @@ yyreduce: (yyval.u.enum_type) = current_enum; current_enum = NULL; } -#line 7192 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7202 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 356: @@ -7196,7 +7206,7 @@ yyreduce: { current_enum = new CPPEnumType((yyvsp[-2].u.extension_enum), NULL, (yyvsp[0].u.type), current_scope, NULL, (yylsp[-2]).file); } -#line 7200 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7210 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 357: @@ -7204,7 +7214,7 @@ yyreduce: { current_enum = new CPPEnumType((yyvsp[0].u.extension_enum), NULL, current_scope, NULL, (yylsp[0]).file); } -#line 7208 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7218 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 358: @@ -7213,7 +7223,7 @@ yyreduce: CPPScope *new_scope = new CPPScope(current_scope, (yyvsp[-2].u.identifier)->_names.back(), V_public); current_enum = new CPPEnumType((yyvsp[-3].u.extension_enum), (yyvsp[-2].u.identifier), (yyvsp[0].u.type), current_scope, new_scope, (yylsp[-3]).file); } -#line 7217 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7227 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 359: @@ -7222,7 +7232,7 @@ yyreduce: CPPScope *new_scope = new CPPScope(current_scope, (yyvsp[0].u.identifier)->_names.back(), V_public); current_enum = new CPPEnumType((yyvsp[-1].u.extension_enum), (yyvsp[0].u.identifier), current_scope, new_scope, (yylsp[-1]).file); } -#line 7226 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7236 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 360: @@ -7230,7 +7240,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type((yyvsp[0].u.simple_type)); } -#line 7234 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7244 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 361: @@ -7238,7 +7248,7 @@ yyreduce: { (yyval.u.type) = (yyvsp[0].u.identifier)->find_type(current_scope, global_scope, false, current_lexer); } -#line 7242 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7252 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 363: @@ -7247,7 +7257,7 @@ yyreduce: assert(current_enum != NULL); current_enum->add_element((yyvsp[-1].u.identifier)->get_simple_name(), NULL, current_lexer, (yylsp[-1])); } -#line 7251 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7261 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 364: @@ -7256,7 +7266,7 @@ yyreduce: assert(current_enum != NULL); current_enum->add_element((yyvsp[-3].u.identifier)->get_simple_name(), (yyvsp[-1].u.expr), current_lexer, (yylsp[-3])); } -#line 7260 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7270 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 366: @@ -7265,7 +7275,7 @@ yyreduce: assert(current_enum != NULL); current_enum->add_element((yyvsp[0].u.identifier)->get_simple_name(), NULL, current_lexer, (yylsp[0])); } -#line 7269 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7279 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 367: @@ -7274,7 +7284,7 @@ yyreduce: assert(current_enum != NULL); current_enum->add_element((yyvsp[-2].u.identifier)->get_simple_name(), (yyvsp[0].u.expr), current_lexer, (yylsp[-2])); } -#line 7278 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7288 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 368: @@ -7282,7 +7292,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_enum; } -#line 7286 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7296 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 369: @@ -7290,7 +7300,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_enum_class; } -#line 7294 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7304 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 370: @@ -7298,7 +7308,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_enum_struct; } -#line 7302 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7312 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 371: @@ -7306,7 +7316,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_class; } -#line 7310 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7320 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 372: @@ -7314,7 +7324,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_struct; } -#line 7318 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7328 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 373: @@ -7322,7 +7332,7 @@ yyreduce: { (yyval.u.extension_enum) = CPPExtensionType::T_union; } -#line 7326 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7336 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 374: @@ -7344,7 +7354,7 @@ yyreduce: current_scope->define_namespace(nspace); push_scope(scope); } -#line 7348 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7358 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 375: @@ -7352,7 +7362,7 @@ yyreduce: { pop_scope(); } -#line 7356 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7366 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 376: @@ -7375,7 +7385,7 @@ yyreduce: current_scope->define_namespace(nspace); push_scope(scope); } -#line 7379 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7389 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 377: @@ -7383,7 +7393,7 @@ yyreduce: { pop_scope(); } -#line 7387 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7397 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 380: @@ -7393,7 +7403,7 @@ yyreduce: current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[-2])); current_scope->add_using(using_decl, global_scope, current_lexer); } -#line 7397 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7407 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 381: @@ -7404,7 +7414,7 @@ yyreduce: typedef_type->_using = true; current_scope->add_declaration(CPPType::new_type(typedef_type), global_scope, current_lexer, (yylsp[-4])); } -#line 7408 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7418 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 382: @@ -7414,7 +7424,7 @@ yyreduce: current_scope->add_declaration(using_decl, global_scope, current_lexer, (yylsp[-3])); current_scope->add_using(using_decl, global_scope, current_lexer); } -#line 7418 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7428 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 386: @@ -7422,7 +7432,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_bool); } -#line 7426 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7436 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 387: @@ -7430,7 +7440,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char); } -#line 7434 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7444 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 388: @@ -7438,7 +7448,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_wchar_t); } -#line 7442 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7452 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 389: @@ -7446,7 +7456,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char16_t); } -#line 7450 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7460 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 390: @@ -7454,7 +7464,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_char32_t); } -#line 7458 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7468 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 391: @@ -7463,7 +7473,7 @@ yyreduce: (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_short); } -#line 7467 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7477 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 392: @@ -7472,7 +7482,7 @@ yyreduce: (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_long); } -#line 7476 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7486 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 393: @@ -7481,7 +7491,7 @@ yyreduce: (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_unsigned); } -#line 7485 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7495 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 394: @@ -7490,7 +7500,7 @@ yyreduce: (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int, CPPSimpleType::F_signed); } -#line 7494 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7504 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 395: @@ -7498,7 +7508,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_int); } -#line 7502 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7512 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 396: @@ -7507,7 +7517,7 @@ yyreduce: (yyval.u.simple_type) = (yyvsp[0].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_short; } -#line 7511 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7521 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 397: @@ -7520,7 +7530,7 @@ yyreduce: (yyval.u.simple_type)->_flags |= CPPSimpleType::F_long; } } -#line 7524 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7534 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 398: @@ -7529,7 +7539,7 @@ yyreduce: (yyval.u.simple_type) = (yyvsp[0].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_unsigned; } -#line 7533 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7543 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 399: @@ -7538,7 +7548,7 @@ yyreduce: (yyval.u.simple_type) = (yyvsp[0].u.simple_type); (yyval.u.simple_type)->_flags |= CPPSimpleType::F_signed; } -#line 7542 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7552 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 400: @@ -7546,7 +7556,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_float); } -#line 7550 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7560 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 401: @@ -7554,7 +7564,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double); } -#line 7558 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7568 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 402: @@ -7563,7 +7573,7 @@ yyreduce: (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_double, CPPSimpleType::F_long); } -#line 7567 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7577 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 403: @@ -7571,7 +7581,7 @@ yyreduce: { (yyval.u.simple_type) = new CPPSimpleType(CPPSimpleType::T_void); } -#line 7575 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7585 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 404: @@ -7579,7 +7589,7 @@ yyreduce: { current_lexer->_resolve_identifiers = false; } -#line 7583 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7593 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 405: @@ -7587,14 +7597,14 @@ yyreduce: { current_lexer->_resolve_identifiers = true; } -#line 7591 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7601 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 513: #line 3006 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { } -#line 7598 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7608 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 537: @@ -7602,7 +7612,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 7606 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7616 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 538: @@ -7610,7 +7620,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 7614 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7624 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 539: @@ -7618,7 +7628,7 @@ yyreduce: { (yyval.u.expr) = (CPPExpression *)NULL; } -#line 7622 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7632 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 540: @@ -7626,7 +7636,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 7630 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7640 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 541: @@ -7634,7 +7644,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 7638 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7648 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 542: @@ -7642,7 +7652,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(',', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7646 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7656 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 543: @@ -7650,7 +7660,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 7654 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7664 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 544: @@ -7658,7 +7668,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr))); } -#line 7662 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7672 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 545: @@ -7666,7 +7676,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast)); } -#line 7670 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7680 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 546: @@ -7674,7 +7684,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast)); } -#line 7678 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7688 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 547: @@ -7682,7 +7692,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast)); } -#line 7686 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7696 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 548: @@ -7690,7 +7700,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast)); } -#line 7694 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7704 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 549: @@ -7698,7 +7708,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type))); } -#line 7702 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7712 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 550: @@ -7714,7 +7724,7 @@ yyreduce: (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func(arg->as_type())); } } -#line 7718 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7728 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 551: @@ -7722,7 +7732,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier))); } -#line 7726 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7736 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 552: @@ -7730,7 +7740,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type))); } -#line 7734 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7744 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 553: @@ -7738,7 +7748,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr)); } -#line 7742 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7752 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 554: @@ -7746,7 +7756,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr)); } -#line 7750 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7760 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 555: @@ -7754,7 +7764,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr)); } -#line 7758 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7768 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 556: @@ -7762,7 +7772,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr)); } -#line 7766 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7776 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 557: @@ -7770,7 +7780,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[0].u.expr)); } -#line 7774 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7784 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 558: @@ -7778,7 +7788,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr)); } -#line 7782 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7792 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 559: @@ -7786,7 +7796,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7790 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7800 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 560: @@ -7794,7 +7804,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7798 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7808 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 561: @@ -7802,7 +7812,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7806 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7816 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 562: @@ -7810,7 +7820,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7814 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7824 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 563: @@ -7818,7 +7828,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7822 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7832 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 564: @@ -7826,7 +7836,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7830 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7840 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 565: @@ -7834,7 +7844,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7838 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7848 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 566: @@ -7842,7 +7852,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7846 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7856 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 567: @@ -7850,7 +7860,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7854 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7864 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 568: @@ -7858,7 +7868,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7862 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7872 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 569: @@ -7866,7 +7876,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7870 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7880 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 570: @@ -7874,7 +7884,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7878 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7888 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 571: @@ -7882,7 +7892,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7886 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7896 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 572: @@ -7890,7 +7900,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7894 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7904 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 573: @@ -7898,7 +7908,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7902 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7912 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 574: @@ -7906,7 +7916,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7910 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7920 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 575: @@ -7914,7 +7924,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7918 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7928 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 576: @@ -7922,7 +7932,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 7926 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7936 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 577: @@ -7930,7 +7940,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 7934 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7944 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 578: @@ -7938,7 +7948,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr)); } -#line 7942 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7952 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 579: @@ -7946,7 +7956,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7950 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7960 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 580: @@ -7954,7 +7964,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 7958 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7968 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 581: @@ -7962,7 +7972,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[-1].u.expr); } -#line 7966 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7976 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 582: @@ -7970,7 +7980,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 7974 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7984 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 583: @@ -7978,7 +7988,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr))); } -#line 7982 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 7992 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 584: @@ -7986,7 +7996,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast)); } -#line 7990 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8000 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 585: @@ -7994,7 +8004,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast)); } -#line 7998 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8008 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 586: @@ -8002,7 +8012,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast)); } -#line 8006 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8016 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 587: @@ -8010,7 +8020,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast)); } -#line 8014 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8024 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 588: @@ -8024,7 +8034,7 @@ yyreduce: assert(type != NULL); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8028 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8038 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 589: @@ -8038,7 +8048,7 @@ yyreduce: assert(type != NULL); (yyval.u.expr) = new CPPExpression(CPPExpression::aggregate_init_op(type, (yyvsp[-1].u.expr))); } -#line 8042 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8052 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 590: @@ -8048,7 +8058,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_int)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8052 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8062 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 591: @@ -8058,7 +8068,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8062 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8072 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 592: @@ -8068,7 +8078,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_wchar_t)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8072 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8082 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 593: @@ -8078,7 +8088,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char16_t)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8082 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8092 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 594: @@ -8088,7 +8098,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_char32_t)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8092 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8102 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 595: @@ -8098,7 +8108,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_bool)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8102 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8112 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 596: @@ -8109,7 +8119,7 @@ yyreduce: CPPSimpleType::F_short)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8113 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8123 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 597: @@ -8120,7 +8130,7 @@ yyreduce: CPPSimpleType::F_long)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8124 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8134 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 598: @@ -8131,7 +8141,7 @@ yyreduce: CPPSimpleType::F_unsigned)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8135 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8145 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 599: @@ -8142,7 +8152,7 @@ yyreduce: CPPSimpleType::F_signed)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8146 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8156 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 600: @@ -8152,7 +8162,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_float)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8156 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8166 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 601: @@ -8162,7 +8172,7 @@ yyreduce: CPPType::new_type(new CPPSimpleType(CPPSimpleType::T_double)); (yyval.u.expr) = new CPPExpression(CPPExpression::construct_op(type, (yyvsp[-1].u.expr))); } -#line 8166 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8176 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 602: @@ -8170,7 +8180,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type))); } -#line 8174 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8184 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 603: @@ -8186,7 +8196,7 @@ yyreduce: (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func(arg->as_type())); } } -#line 8190 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8200 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 604: @@ -8194,7 +8204,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier))); } -#line 8198 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8208 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 605: @@ -8202,7 +8212,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type))); } -#line 8206 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8216 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 606: @@ -8210,7 +8220,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[0].u.type))); } -#line 8214 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8224 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 607: @@ -8218,7 +8228,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[-3].u.type), (yyvsp[-1].u.expr))); } -#line 8222 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8232 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 608: @@ -8233,7 +8243,7 @@ yyreduce: } (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.type), std_type_info)); } -#line 8237 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8247 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 609: @@ -8248,7 +8258,7 @@ yyreduce: } (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.expr), std_type_info)); } -#line 8252 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8262 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 610: @@ -8256,7 +8266,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr)); } -#line 8260 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8270 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 611: @@ -8264,7 +8274,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr)); } -#line 8268 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8278 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 612: @@ -8272,7 +8282,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr)); } -#line 8276 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8286 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 613: @@ -8280,7 +8290,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr)); } -#line 8284 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8294 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 614: @@ -8288,7 +8298,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_STAR, (yyvsp[0].u.expr)); } -#line 8292 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8302 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 615: @@ -8296,7 +8306,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr)); } -#line 8300 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8310 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 616: @@ -8304,7 +8314,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8308 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8318 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 617: @@ -8312,7 +8322,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8316 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8326 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 618: @@ -8320,7 +8330,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8324 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8334 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 619: @@ -8328,7 +8338,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8332 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8342 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 620: @@ -8336,7 +8346,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8340 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8350 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 621: @@ -8344,7 +8354,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8348 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8358 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 622: @@ -8352,7 +8362,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8356 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8366 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 623: @@ -8360,7 +8370,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8364 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8374 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 624: @@ -8368,7 +8378,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8372 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8382 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 625: @@ -8376,7 +8386,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8380 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8390 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 626: @@ -8384,7 +8394,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8388 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8398 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 627: @@ -8392,7 +8402,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8406 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 628: @@ -8400,7 +8410,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8404 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8414 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 629: @@ -8408,7 +8418,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8412 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8422 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 630: @@ -8416,7 +8426,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('<', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8420 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8430 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 631: @@ -8424,7 +8434,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('>', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8428 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8438 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 632: @@ -8432,7 +8442,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8436 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8446 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 633: @@ -8440,7 +8450,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8444 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8454 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 634: @@ -8448,7 +8458,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8452 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8462 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 635: @@ -8456,7 +8466,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 8460 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8470 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 636: @@ -8464,7 +8474,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 8468 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8478 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 637: @@ -8472,7 +8482,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr)); } -#line 8476 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8486 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 638: @@ -8480,7 +8490,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8484 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8494 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 639: @@ -8488,7 +8498,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8492 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8502 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 640: @@ -8496,7 +8506,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[-1].u.expr); } -#line 8500 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8510 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 641: @@ -8504,7 +8514,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer)); } -#line 8508 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8518 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 642: @@ -8512,7 +8522,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(true); } -#line 8516 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8526 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 643: @@ -8520,7 +8530,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(false); } -#line 8524 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8534 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 644: @@ -8528,7 +8538,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer)); } -#line 8532 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8542 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 645: @@ -8536,7 +8546,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.real)); } -#line 8540 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8550 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 646: @@ -8544,7 +8554,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 8548 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8558 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 647: @@ -8552,7 +8562,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 8556 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8566 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 648: @@ -8560,7 +8570,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer); } -#line 8564 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8574 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 649: @@ -8570,7 +8580,7 @@ yyreduce: CPPIdentifier *ident = new CPPIdentifier("final", (yylsp[0])); (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer); } -#line 8574 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8584 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 650: @@ -8580,7 +8590,7 @@ yyreduce: CPPIdentifier *ident = new CPPIdentifier("override", (yylsp[0])); (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer); } -#line 8584 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8594 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 651: @@ -8588,7 +8598,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); } -#line 8592 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8602 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 652: @@ -8598,7 +8608,7 @@ yyreduce: (yyvsp[-6].u.closure_type)->_return_type = (yyvsp[-3].u.type); (yyval.u.expr) = new CPPExpression(CPPExpression::lambda((yyvsp[-6].u.closure_type))); } -#line 8602 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8612 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 653: @@ -8609,7 +8619,7 @@ yyreduce: (yyvsp[-9].u.closure_type)->_return_type = (yyvsp[-3].u.type); (yyval.u.expr) = new CPPExpression(CPPExpression::lambda((yyvsp[-9].u.closure_type))); } -#line 8613 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8623 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 654: @@ -8617,7 +8627,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_HAS_VIRTUAL_DESTRUCTOR, (yyvsp[-1].u.type))); } -#line 8621 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8631 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 655: @@ -8625,7 +8635,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_ABSTRACT, (yyvsp[-1].u.type))); } -#line 8629 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8639 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 656: @@ -8633,7 +8643,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, (yyvsp[-3].u.type), (yyvsp[-1].u.type))); } -#line 8637 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8647 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 657: @@ -8641,7 +8651,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CLASS, (yyvsp[-1].u.type))); } -#line 8645 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8655 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 658: @@ -8649,7 +8659,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, (yyvsp[-1].u.type))); } -#line 8653 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8663 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 659: @@ -8657,7 +8667,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONSTRUCTIBLE, (yyvsp[-3].u.type), (yyvsp[-1].u.type))); } -#line 8661 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8671 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 660: @@ -8665,7 +8675,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_CONVERTIBLE_TO, (yyvsp[-3].u.type), (yyvsp[-1].u.type))); } -#line 8669 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8679 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 661: @@ -8673,7 +8683,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_DESTRUCTIBLE, (yyvsp[-1].u.type))); } -#line 8677 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8687 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 662: @@ -8681,7 +8691,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_EMPTY, (yyvsp[-1].u.type))); } -#line 8685 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8695 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 663: @@ -8689,7 +8699,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_ENUM, (yyvsp[-1].u.type))); } -#line 8693 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8703 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 664: @@ -8697,7 +8707,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_FINAL, (yyvsp[-1].u.type))); } -#line 8701 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8711 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 665: @@ -8705,7 +8715,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_FUNDAMENTAL, (yyvsp[-1].u.type))); } -#line 8709 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8719 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 666: @@ -8713,7 +8723,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_POD, (yyvsp[-1].u.type))); } -#line 8717 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8727 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 667: @@ -8721,7 +8731,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_POLYMORPHIC, (yyvsp[-1].u.type))); } -#line 8725 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8735 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 668: @@ -8729,7 +8739,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_STANDARD_LAYOUT, (yyvsp[-1].u.type))); } -#line 8733 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8743 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 669: @@ -8737,7 +8747,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_TRIVIAL, (yyvsp[-1].u.type))); } -#line 8741 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8751 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 670: @@ -8745,7 +8755,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::type_trait(KW_IS_UNION, (yyvsp[-1].u.type))); } -#line 8749 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8759 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 671: @@ -8753,7 +8763,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 8757 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8767 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 672: @@ -8761,7 +8771,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-2].u.type), (yyvsp[0].u.expr))); } -#line 8765 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8775 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 673: @@ -8769,7 +8779,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_static_cast)); } -#line 8773 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8783 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 674: @@ -8777,7 +8787,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_dynamic_cast)); } -#line 8781 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8791 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 675: @@ -8785,7 +8795,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_const_cast)); } -#line 8789 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8799 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 676: @@ -8793,7 +8803,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::typecast_op((yyvsp[-4].u.type), (yyvsp[-1].u.expr), CPPExpression::T_reinterpret_cast)); } -#line 8797 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8807 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 677: @@ -8801,7 +8811,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func((yyvsp[-1].u.type))); } -#line 8805 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8815 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 678: @@ -8817,7 +8827,7 @@ yyreduce: (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_func(arg->as_type())); } } -#line 8821 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8831 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 679: @@ -8825,7 +8835,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::sizeof_ellipsis_func((yyvsp[-1].u.identifier))); } -#line 8829 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8839 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 680: @@ -8833,7 +8843,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::alignof_func((yyvsp[-1].u.type))); } -#line 8837 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8847 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 681: @@ -8841,7 +8851,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[0].u.type))); } -#line 8845 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8855 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 682: @@ -8849,7 +8859,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::new_op((yyvsp[-3].u.type), (yyvsp[-1].u.expr))); } -#line 8853 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8863 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 683: @@ -8864,7 +8874,7 @@ yyreduce: } (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.type), std_type_info)); } -#line 8868 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8878 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 684: @@ -8879,7 +8889,7 @@ yyreduce: } (yyval.u.expr) = new CPPExpression(CPPExpression::typeid_op((yyvsp[-1].u.expr), std_type_info)); } -#line 8883 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8893 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 685: @@ -8887,7 +8897,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NOT, (yyvsp[0].u.expr)); } -#line 8891 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8901 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 686: @@ -8895,7 +8905,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_NEGATE, (yyvsp[0].u.expr)); } -#line 8899 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8909 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 687: @@ -8903,7 +8913,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_MINUS, (yyvsp[0].u.expr)); } -#line 8907 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8917 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 688: @@ -8911,7 +8921,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_PLUS, (yyvsp[0].u.expr)); } -#line 8915 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8925 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 689: @@ -8919,7 +8929,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(UNARY_REF, (yyvsp[0].u.expr)); } -#line 8923 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8933 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 690: @@ -8927,7 +8937,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('*', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8931 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8941 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 691: @@ -8935,7 +8945,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('/', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8939 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8949 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 692: @@ -8943,7 +8953,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('%', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8947 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8957 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 693: @@ -8951,7 +8961,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('+', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8955 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8965 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 694: @@ -8959,7 +8969,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('-', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8963 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8973 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 695: @@ -8967,7 +8977,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('|', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8971 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8981 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 696: @@ -8975,7 +8985,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('^', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8979 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8989 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 697: @@ -8983,7 +8993,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('&', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8987 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 8997 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 698: @@ -8991,7 +9001,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(OROR, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 8995 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9005 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 699: @@ -8999,7 +9009,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(ANDAND, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9003 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9013 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 700: @@ -9007,7 +9017,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(EQCOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9011 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9021 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 701: @@ -9015,7 +9025,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(NECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9019 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9029 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 702: @@ -9023,7 +9033,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9027 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9037 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 703: @@ -9031,7 +9041,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(GECOMPARE, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9035 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9045 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 704: @@ -9039,7 +9049,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('<', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9043 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9053 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 705: @@ -9047,7 +9057,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('>', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9051 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9061 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 706: @@ -9055,7 +9065,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(LSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9059 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9069 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 707: @@ -9063,7 +9073,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(RSHIFT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9067 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9077 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 708: @@ -9071,7 +9081,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('?', (yyvsp[-4].u.expr), (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9075 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9085 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 709: @@ -9079,7 +9089,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('[', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 9083 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9093 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 710: @@ -9087,7 +9097,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-3].u.expr), (yyvsp[-1].u.expr)); } -#line 9091 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9101 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 711: @@ -9095,7 +9105,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('f', (yyvsp[-2].u.expr)); } -#line 9099 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9109 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 712: @@ -9103,7 +9113,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression('.', (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9107 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9117 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 713: @@ -9111,7 +9121,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(POINTSAT, (yyvsp[-2].u.expr), (yyvsp[0].u.expr)); } -#line 9115 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9125 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 714: @@ -9119,7 +9129,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[-1].u.expr); } -#line 9123 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9133 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 715: @@ -9127,7 +9137,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer)); } -#line 9131 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9141 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 716: @@ -9135,7 +9145,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(true); } -#line 9139 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9149 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 717: @@ -9143,7 +9153,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(false); } -#line 9147 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9157 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 718: @@ -9151,7 +9161,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.integer)); } -#line 9155 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9165 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 719: @@ -9159,7 +9169,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.real)); } -#line 9163 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9173 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 720: @@ -9167,7 +9177,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 9171 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9181 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 721: @@ -9175,7 +9185,7 @@ yyreduce: { (yyval.u.expr) = (yyvsp[0].u.expr); } -#line 9179 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9189 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 722: @@ -9183,7 +9193,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression((yyvsp[0].u.identifier), current_scope, global_scope, current_lexer); } -#line 9187 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9197 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 723: @@ -9193,7 +9203,7 @@ yyreduce: CPPIdentifier *ident = new CPPIdentifier("final", (yylsp[0])); (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer); } -#line 9197 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9207 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 724: @@ -9203,7 +9213,7 @@ yyreduce: CPPIdentifier *ident = new CPPIdentifier("override", (yylsp[0])); (yyval.u.expr) = new CPPExpression(ident, current_scope, global_scope, current_lexer); } -#line 9207 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9217 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 725: @@ -9211,7 +9221,7 @@ yyreduce: { (yyval.u.expr) = new CPPExpression(CPPExpression::get_nullptr()); } -#line 9215 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9225 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 726: @@ -9219,7 +9229,7 @@ yyreduce: { (yyval.u.closure_type) = new CPPClosureType(); } -#line 9223 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9233 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 727: @@ -9227,7 +9237,7 @@ yyreduce: { (yyval.u.closure_type) = new CPPClosureType(CPPClosureType::CT_by_value); } -#line 9231 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9241 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 728: @@ -9235,7 +9245,7 @@ yyreduce: { (yyval.u.closure_type) = new CPPClosureType(CPPClosureType::CT_by_reference); } -#line 9239 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9249 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 729: @@ -9246,7 +9256,7 @@ yyreduce: (yyval.u.closure_type)->_captures.push_back(*(yyvsp[-1].u.capture)); delete (yyvsp[-1].u.capture); } -#line 9250 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9260 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 730: @@ -9257,7 +9267,7 @@ yyreduce: (yyval.u.closure_type)->_captures.push_back(*(yyvsp[-1].u.capture)); delete (yyvsp[-1].u.capture); } -#line 9261 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9271 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 731: @@ -9267,7 +9277,7 @@ yyreduce: (yyval.u.capture)->_name = (yyvsp[0].u.identifier)->get_simple_name(); (yyval.u.capture)->_type = CPPClosureType::CT_by_reference; } -#line 9271 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9281 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 732: @@ -9277,7 +9287,7 @@ yyreduce: (yyval.u.capture)->_name = (yyvsp[-1].u.identifier)->get_simple_name(); (yyval.u.capture)->_type = CPPClosureType::CT_by_reference; } -#line 9281 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9291 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 733: @@ -9291,7 +9301,7 @@ yyreduce: (yyval.u.capture)->_type = CPPClosureType::CT_by_value; } } -#line 9295 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9305 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 734: @@ -9304,7 +9314,7 @@ yyreduce: yywarning("only capture name 'this' may be preceded by an asterisk", (yylsp[0])); } } -#line 9308 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9318 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 735: @@ -9316,7 +9326,7 @@ yyreduce: } (yyval.u.type) = type; } -#line 9320 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9330 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 736: @@ -9324,7 +9334,7 @@ yyreduce: { (yyval.u.type) = CPPType::new_type(new CPPTBDType((yyvsp[0].u.identifier))); } -#line 9328 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9338 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 737: @@ -9334,7 +9344,7 @@ yyreduce: ctp->_packed = true; (yyval.u.type) = CPPType::new_type(ctp); } -#line 9338 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9348 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 738: @@ -9342,7 +9352,7 @@ yyreduce: { (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9346 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9356 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 739: @@ -9350,7 +9360,7 @@ yyreduce: { (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9354 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9364 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 740: @@ -9358,7 +9368,7 @@ yyreduce: { (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9362 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9372 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 741: @@ -9366,7 +9376,7 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("final", (yylsp[0])); } -#line 9370 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9380 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 742: @@ -9374,7 +9384,7 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("override", (yylsp[0])); } -#line 9378 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9388 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 743: @@ -9384,7 +9394,7 @@ yyreduce: // in MAKE_PROPERTY definitions, etc. (yyval.u.identifier) = new CPPIdentifier("signed", (yylsp[0])); } -#line 9388 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9398 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 744: @@ -9392,7 +9402,7 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("float", (yylsp[0])); } -#line 9396 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9406 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 745: @@ -9400,7 +9410,7 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("public", (yylsp[0])); } -#line 9404 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9414 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 746: @@ -9408,7 +9418,7 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("private", (yylsp[0])); } -#line 9412 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9422 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 747: @@ -9416,15 +9426,15 @@ yyreduce: { (yyval.u.identifier) = new CPPIdentifier("static", (yylsp[0])); } -#line 9420 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9430 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 748: -#line 4063 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ +#line 4056 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { - (yyval.u.identifier) = (yyvsp[0].u.identifier); + (yyval.u.identifier) = new CPPIdentifier("default", (yylsp[0])); } -#line 9428 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9438 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 749: @@ -9432,7 +9442,7 @@ yyreduce: { (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9436 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9446 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 750: @@ -9440,45 +9450,53 @@ yyreduce: { (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9444 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9454 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 751: #line 4075 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { - (yyval.u.identifier) = new CPPIdentifier("override", (yylsp[0])); + (yyval.u.identifier) = (yyvsp[0].u.identifier); } -#line 9452 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9462 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 752: -#line 4083 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ +#line 4079 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { - (yyval.u.expr) = new CPPExpression((yyvsp[0].str)); + (yyval.u.identifier) = new CPPIdentifier("override", (yylsp[0])); } -#line 9460 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9470 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 753: #line 4087 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { - (yyval.u.expr) = (yyvsp[0].u.expr); + (yyval.u.expr) = new CPPExpression((yyvsp[0].str)); } -#line 9468 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9478 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; case 754: #line 4091 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { + (yyval.u.expr) = (yyvsp[0].u.expr); +} +#line 9486 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ + break; + + case 755: +#line 4095 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ + { // The right string takes on the literal type of the left. (yyval.u.expr) = (yyvsp[-1].u.expr); (yyval.u.expr)->_str += (yyvsp[0].str); } -#line 9478 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9496 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; - case 755: -#line 4097 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ + case 756: +#line 4101 "dtool/src/cppparser/cppBison.yxx" /* yacc.c:1646 */ { // We have to check that the two literal types match up. (yyval.u.expr) = (yyvsp[-1].u.expr); @@ -9487,11 +9505,11 @@ yyreduce: } (yyval.u.expr)->_str += (yyvsp[0].u.expr)->_str; } -#line 9491 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9509 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ break; -#line 9495 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ +#line 9513 "built/tmp/cppBison.yxx.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 305b5a005c..5c834d5851 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -4051,6 +4051,10 @@ name: | KW_STATIC { $$ = new CPPIdentifier("static", @1); +} + | KW_DEFAULT +{ + $$ = new CPPIdentifier("default", @1); } ; diff --git a/dtool/src/dtoolutil/executionEnvironment.h b/dtool/src/dtoolutil/executionEnvironment.h index bd1c6e879a..f2f5472193 100644 --- a/dtool/src/dtoolutil/executionEnvironment.h +++ b/dtool/src/dtoolutil/executionEnvironment.h @@ -51,6 +51,11 @@ PUBLISHED: static Filename get_cwd(); + MAKE_SEQ_PROPERTY(args, get_num_args, get_arg); + MAKE_PROPERTY(binary_name, get_binary_name, set_binary_name); + MAKE_PROPERTY(dtool_name, get_dtool_name, set_dtool_name); + MAKE_PROPERTY(cwd, get_cwd); + private: bool ns_has_environment_variable(const string &var) const; string ns_get_environment_variable(const string &var) const; diff --git a/dtool/src/dtoolutil/pandaSystem.h b/dtool/src/dtoolutil/pandaSystem.h index bed5f2c073..85c1a0ea38 100644 --- a/dtool/src/dtoolutil/pandaSystem.h +++ b/dtool/src/dtoolutil/pandaSystem.h @@ -48,6 +48,21 @@ PUBLISHED: static string get_platform(); + MAKE_PROPERTY(version_string, get_version_string); + MAKE_PROPERTY(major_version, get_major_version); + MAKE_PROPERTY(minor_version, get_minor_version); + MAKE_PROPERTY(sequence_version, get_sequence_version); + MAKE_PROPERTY(official_version, is_official_version); + + MAKE_PROPERTY(memory_alignment, get_memory_alignment); + + MAKE_PROPERTY(distributor, get_distributor); + MAKE_PROPERTY(compiler, get_compiler); + MAKE_PROPERTY(build_date, get_build_date); + MAKE_PROPERTY(git_commit, get_git_commit); + + MAKE_PROPERTY(platform, get_platform); + bool has_system(const string &system) const; size_t get_num_systems() const; string get_system(size_t n) const; diff --git a/dtool/src/dtoolutil/textEncoder.h b/dtool/src/dtoolutil/textEncoder.h index bc42d4a4c1..ca885b15c3 100644 --- a/dtool/src/dtoolutil/textEncoder.h +++ b/dtool/src/dtoolutil/textEncoder.h @@ -46,6 +46,7 @@ PUBLISHED: INLINE static void set_default_encoding(Encoding encoding); INLINE static Encoding get_default_encoding(); + MAKE_PROPERTY(default_encoding, get_default_encoding, set_default_encoding); INLINE void set_text(const string &text); INLINE void set_text(const string &text, Encoding encoding); diff --git a/dtool/src/interrogate/interfaceMaker.cxx b/dtool/src/interrogate/interfaceMaker.cxx index c84456983d..527f983f8a 100644 --- a/dtool/src/interrogate/interfaceMaker.cxx +++ b/dtool/src/interrogate/interfaceMaker.cxx @@ -91,7 +91,8 @@ Property(const InterrogateElement &ielement) : _setter(NULL), _has_function(NULL), _clear_function(NULL), - _deleter(NULL) + _deleter(NULL), + _has_this(false) { } diff --git a/dtool/src/interrogate/interfaceMaker.h b/dtool/src/interrogate/interfaceMaker.h index c84714eb51..eb23e28430 100644 --- a/dtool/src/interrogate/interfaceMaker.h +++ b/dtool/src/interrogate/interfaceMaker.h @@ -132,6 +132,7 @@ public: Function *_has_function; Function *_clear_function; Function *_deleter; + bool _has_this; }; typedef vector Properties; diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index c4dd2d3b21..4042136bab 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2623,7 +2623,8 @@ write_module_class(ostream &out, Object *obj) { for (pit = obj->_properties.begin(); pit != obj->_properties.end(); ++pit) { Property *property = (*pit); const InterrogateElement &ielem = property->_ielement; - if (property->_getter == NULL || !is_function_legal(property->_getter)) { + if (!property->_has_this || + property->_getter == NULL || !is_function_legal(property->_getter)) { continue; } @@ -3169,6 +3170,45 @@ write_module_class(ostream &out, Object *obj) { } } + // Also add the static properties, which can't be added via getset. + Properties::const_iterator pit; + for (pit = obj->_properties.begin(); pit != obj->_properties.end(); ++pit) { + Property *property = (*pit); + const InterrogateElement &ielem = property->_ielement; + if (property->_has_this || + property->_getter == NULL || !is_function_legal(property->_getter)) { + continue; + } + + string name1 = methodNameFromCppName(ielem.get_name(), "", false); + // string name2 = methodNameFromCppName(ielem.get_name(), "", true); + + string getter = "&Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter"; + string setter = "NULL"; + if (property->_length_function == NULL && + property->_setter != NULL && is_function_legal(property->_setter)) { + setter = "&Dtool_" + ClassName + "_" + ielem.get_name() + "_Setter"; + } + + out << " static const PyGetSetDef def_" << name1 << " = {(char *)\"" << name1 << "\", " << getter << ", " << setter; + + if (ielem.has_comment()) { + out << ", (char *)\n"; + output_quoted(out, 4, ielem.get_comment()); + out << ",\n "; + } else { + out << ", NULL, "; + } + + // Extra void* argument; we don't make use of it. + out << "NULL};\n"; + + out << " PyDict_SetItemString(dict, \"" << name1 << "\", Dtool_NewStaticProperty(&Dtool_" << ClassName << "._PyType, &def_" << name1 << "));\n"; + /* Alternative spelling: + out << " PyDict_SetItemString(\"" << name2 << "\", &def_" << name1 << ");\n"; + */ + } + out << " if (PyType_Ready((PyTypeObject *)&Dtool_" << ClassName << ") < 0) {\n" " Dtool_Raise_TypeError(\"PyType_Ready(" << ClassName << ")\");\n" " return;\n" @@ -6443,11 +6483,15 @@ write_getset(ostream &out, Object *obj, Property *property) { "/**\n" " * sequence getter for property " << cClassName << "::" << ielem.get_name() << "\n" " */\n" - "static PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getitem(PyObject *self, Py_ssize_t index) {\n" - " " << cClassName << " *local_this = NULL;\n" - " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n" - " return NULL;\n" - " }\n"; + "static PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getitem(PyObject *self, Py_ssize_t index) {\n"; + if (property->_getter->_has_this || + (property->_has_function && property->_has_function->_has_this)) { + out << + " " << cClassName << " *local_this = NULL;\n" + " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n" + " return NULL;\n" + " }\n"; + } // This is a getitem of a sequence type. This means we *need* to raise // IndexError if we're out of bounds. @@ -6458,8 +6502,12 @@ write_getset(ostream &out, Object *obj, Property *property) { out << " }\n"; if (property->_has_function != NULL) { - out << " if (!local_this->" << property->_has_function->_ifunc.get_name() << "(index)) {\n" - << " Py_INCREF(Py_None);\n" + if (property->_has_function->_has_this) { + out << " if (!local_this->" << property->_has_function->_ifunc.get_name() << "(index)) {\n"; + } else { + out << " if (!" << cClassName << "::" << property->_has_function->_ifunc.get_name() << "(index)) {\n"; + } + out << " Py_INCREF(Py_None);\n" << " return Py_None;\n" << " }\n"; } @@ -6494,16 +6542,22 @@ write_getset(ostream &out, Object *obj, Property *property) { // Write out a setitem if this is not a read-only property. if (property->_setter != NULL) { out << "static int Dtool_" + ClassName + "_" + ielem.get_name() + "_Setitem(PyObject *self, Py_ssize_t index, PyObject *arg) {\n"; - out << " " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" - << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; - out << " return -1;\n"; - out << " }\n\n"; + if (property->_has_this) { + out << " " << cClassName << " *local_this = NULL;\n"; + out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" + << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; + out << " return -1;\n"; + out << " }\n\n"; + } out << " if (arg == (PyObject *)NULL) {\n"; if (property->_deleter != NULL) { - out << " local_this->" << property->_deleter->_ifunc.get_name() << "(index);\n" - << " return 0;\n"; + if (property->_deleter->_has_this) { + out << " local_this->" << property->_deleter->_ifunc.get_name() << "(index);\n"; + } else { + out << " " << cClassName << "::" << property->_deleter->_ifunc.get_name() << "(index);\n"; + } + out << " return 0;\n"; } else { out << " Dtool_Raise_TypeError(\"can't delete " << ielem.get_name() << "[] attribute\");\n" " return -1;\n"; @@ -6511,9 +6565,13 @@ write_getset(ostream &out, Object *obj, Property *property) { out << " }\n"; if (property->_clear_function != NULL) { - out << " if (arg == Py_None) {\n" - << " local_this->" << property->_clear_function->_ifunc.get_name() << "(index);\n" - << " return 0;\n" + out << " if (arg == Py_None) {\n"; + if (property->_clear_function->_has_this) { + out << " local_this->" << property->_clear_function->_ifunc.get_name() << "(index);\n"; + } else { + out << " " << cClassName << "::" << property->_clear_function->_ifunc.get_name() << "(index);\n"; + } + out << " return 0;\n" << " }\n"; } @@ -6547,9 +6605,14 @@ write_getset(ostream &out, Object *obj, Property *property) { } // Now write the getter, which returns a special wrapper object. - out << "static PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter(PyObject *self, void *) {\n" - " Py_INCREF(self);\n" - " Dtool_SequenceWrapper *wrap = PyObject_New(Dtool_SequenceWrapper, &Dtool_SequenceWrapper_Type);\n" + out << "static PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter(PyObject *self, void *) {\n"; + if (property->_has_this) { + out << " nassertr(self != NULL, NULL);\n" + " Py_INCREF(self);\n"; + } else { + out << " Py_XINCREF(self);\n"; + } + out << " Dtool_SequenceWrapper *wrap = PyObject_New(Dtool_SequenceWrapper, &Dtool_SequenceWrapper_Type);\n" " wrap->_base = self;\n" " wrap->_len_func = &Dtool_" << ClassName << "_" << ielem.get_name() << "_Len;\n" " wrap->_getitem_func = &Dtool_" << ClassName << "_" << ielem.get_name() << "_Getitem;\n"; @@ -6566,20 +6629,26 @@ write_getset(ostream &out, Object *obj, Property *property) { out << "static PyObject *Dtool_" + ClassName + "_" + ielem.get_name() + "_Getter(PyObject *self, void *) {\n"; FunctionRemap *remap = property->_getter->_remaps.front(); - if (remap->_const_method) { - out << " const " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n"; - } else { - out << " " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" - << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; + if (remap->_has_this) { + if (remap->_const_method) { + out << " const " << cClassName << " *local_this = NULL;\n"; + out << " if (!Dtool_Call_ExtractThisPointer(self, Dtool_" << ClassName << ", (void **)&local_this)) {\n"; + } else { + out << " " << cClassName << " *local_this = NULL;\n"; + out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" + << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; + } + out << " return NULL;\n"; + out << " }\n\n"; } - out << " return NULL;\n"; - out << " }\n\n"; if (property->_has_function != NULL) { - out << " if (!local_this->" << property->_has_function->_ifunc.get_name() << "()) {\n" - << " Py_INCREF(Py_None);\n" + if (remap->_has_this) { + out << " if (!local_this->" << property->_has_function->_ifunc.get_name() << "()) {\n"; + } else { + out << " if (!" << cClassName << "::" << property->_has_function->_ifunc.get_name() << "()) {\n"; + } + out << " Py_INCREF(Py_None);\n" << " return Py_None;\n" << " }\n"; } @@ -6596,16 +6665,21 @@ write_getset(ostream &out, Object *obj, Property *property) { // Write out a setter if this is not a read-only property. if (property->_setter != NULL) { out << "static int Dtool_" + ClassName + "_" + ielem.get_name() + "_Setter(PyObject *self, PyObject *arg, void *) {\n"; - out << " " << cClassName << " *local_this = NULL;\n"; - out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" - << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; - out << " return -1;\n"; - out << " }\n\n"; + if (remap->_has_this) { + out << " " << cClassName << " *local_this = NULL;\n"; + out << " if (!Dtool_Call_ExtractThisPointer_NonConst(self, Dtool_" << ClassName << ", (void **)&local_this, \"" + << classNameFromCppName(cClassName, false) << "." << ielem.get_name() << "\")) {\n"; + out << " return -1;\n"; + out << " }\n\n"; + } out << " if (arg == (PyObject *)NULL) {\n"; - if (property->_deleter != NULL) { + if (property->_deleter != NULL && remap->_has_this) { out << " local_this->" << property->_deleter->_ifunc.get_name() << "();\n" << " return 0;\n"; + } else if (property->_deleter != NULL) { + out << " " << cClassName << "::" << property->_deleter->_ifunc.get_name() << "();\n" + << " return 0;\n"; } else { out << " Dtool_Raise_TypeError(\"can't delete " << ielem.get_name() << " attribute\");\n" " return -1;\n"; @@ -6613,9 +6687,13 @@ write_getset(ostream &out, Object *obj, Property *property) { out << " }\n"; if (property->_clear_function != NULL) { - out << " if (arg == Py_None) {\n" - << " local_this->" << property->_clear_function->_ifunc.get_name() << "();\n" - << " return 0;\n" + out << " if (arg == Py_None) {\n"; + if (remap->_has_this) { + out << " local_this->" << property->_clear_function->_ifunc.get_name() << "();\n"; + } else { + out << " " << cClassName << "::" << property->_clear_function->_ifunc.get_name() << "();\n"; + } + out << " return 0;\n" << " }\n"; } @@ -6744,6 +6822,7 @@ record_object(TypeIndex type_index) { Function *setter = record_function(itype, func_index); if (is_function_legal(setter)) { property->_setter = setter; + property->_has_this |= setter->_has_this; } } @@ -6752,6 +6831,7 @@ record_object(TypeIndex type_index) { Function *getter = record_function(itype, func_index); if (is_function_legal(getter)) { property->_getter = getter; + property->_has_this |= getter->_has_this; } } @@ -6760,6 +6840,7 @@ record_object(TypeIndex type_index) { Function *has_function = record_function(itype, func_index); if (is_function_legal(has_function)) { property->_has_function = has_function; + property->_has_this |= has_function->_has_this; } } @@ -6768,6 +6849,7 @@ record_object(TypeIndex type_index) { Function *clear_function = record_function(itype, func_index); if (is_function_legal(clear_function)) { property->_clear_function = clear_function; + property->_has_this |= clear_function->_has_this; } } @@ -6776,12 +6858,16 @@ record_object(TypeIndex type_index) { Function *del_function = record_function(itype, func_index); if (is_function_legal(del_function)) { property->_deleter = del_function; + property->_has_this |= del_function->_has_this; } } if (ielement.is_sequence()) { FunctionIndex func_index = ielement.get_length_function(); property->_length_function = record_function(itype, func_index); + if (property->_length_function != nullptr) { + property->_has_this |= property->_length_function->_has_this; + } } if (property->_getter != NULL) { diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 52525d74e6..1abb34100b 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -618,8 +618,11 @@ PyObject *Dtool_PyModuleInitHelper(LibraryDef *defs[], const char *modulename) { dtool_inited = true; if (PyType_Ready(&Dtool_SequenceWrapper_Type) < 0) { - PyErr_SetString(PyExc_TypeError, "PyType_Ready(Dtool_SequenceWrapper)"); - return NULL; + return Dtool_Raise_TypeError("PyType_Ready(Dtool_SequenceWrapper)"); + } + + if (PyType_Ready(&Dtool_StaticProperty_Type) < 0) { + return Dtool_Raise_TypeError("PyType_Ready(Dtool_StaticProperty_Type)"); } // Initialize the base class of everything. @@ -1035,7 +1038,7 @@ bool Dtool_ExtractOptionalArg(PyObject **result, PyObject *args, PyObject *kwds) static void Dtool_SequenceWrapper_dealloc(PyObject *self) { Dtool_SequenceWrapper *wrap = (Dtool_SequenceWrapper *)self; nassertv(wrap); - Py_DECREF(wrap->_base); + Py_XDECREF(wrap->_base); } static Py_ssize_t Dtool_SequenceWrapper_length(PyObject *self) { @@ -1131,4 +1134,134 @@ PyTypeObject Dtool_SequenceWrapper_Type = { #endif }; +/** + * This is a variant of the Python getset mechanism that permits static + * properties. + */ +PyObject * +Dtool_NewStaticProperty(PyTypeObject *type, const PyGetSetDef *getset) { + PyGetSetDescrObject *descr; + descr = (PyGetSetDescrObject *)PyType_GenericAlloc(&Dtool_StaticProperty_Type, 0); + if (descr != nullptr) { + Py_XINCREF(type); + descr->d_getset = (PyGetSetDef *)getset; +#if PY_MAJOR_VERSION >= 3 + descr->d_common.d_type = type; + descr->d_common.d_name = PyUnicode_InternFromString(getset->name); + descr->d_common.d_qualname = nullptr; +#else + descr->d_type = type; + descr->d_name = PyString_InternFromString(getset->name); +#endif + } + return (PyObject *)descr; +} + +static void +Dtool_StaticProperty_dealloc(PyDescrObject *descr) { + _PyObject_GC_UNTRACK(descr); + Py_XDECREF(descr->d_type); + Py_XDECREF(descr->d_name); +//#if PY_MAJOR_VERSION >= 3 +// Py_XDECREF(descr->d_qualname); +//#endif + PyObject_GC_Del(descr); +} + +static PyObject * +Dtool_StaticProperty_repr(PyDescrObject *descr, const char *format) { +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", descr->d_name, "?", descr->d_type->tp_name); +#else + return PyString_FromFormat("", descr->d_name, "?", descr->d_type->tp_name); +#endif +} + +static int +Dtool_StaticProperty_traverse(PyObject *self, visitproc visit, void *arg) { + PyDescrObject *descr = (PyDescrObject *)self; + Py_VISIT(descr->d_type); + return 0; +} + +static PyObject * +Dtool_StaticProperty_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *type) { + if (descr->d_getset->get != nullptr) { + return descr->d_getset->get(obj, descr->d_getset->closure); + } else { + return PyErr_Format(PyExc_AttributeError, + "attribute '%V' of type '%.100s' is not readable", + ((PyDescrObject *)descr)->d_name, "?", + ((PyDescrObject *)descr)->d_type->tp_name); + } +} + +static int +Dtool_StaticProperty_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value) { + if (descr->d_getset->set != nullptr) { + return descr->d_getset->set(obj, value, descr->d_getset->closure); + } else { + PyErr_Format(PyExc_AttributeError, + "attribute '%V' of type '%.100s' is not writable", + ((PyDescrObject *)descr)->d_name, "?", + ((PyDescrObject *)descr)->d_type->tp_name); + return -1; + } +} + +PyTypeObject Dtool_StaticProperty_Type = { + PyVarObject_HEAD_INIT(&PyType_Type, 0) + "getset_descriptor", + sizeof(PyGetSetDescrObject), + 0, // tp_itemsize + (destructor)Dtool_StaticProperty_dealloc, + 0, // tp_print + 0, // tp_getattr + 0, // tp_setattr + 0, // tp_reserved + (reprfunc)Dtool_StaticProperty_repr, + 0, // tp_as_number + 0, // tp_as_sequence + 0, // tp_as_mapping + 0, // tp_hash + 0, // tp_call + 0, // tp_str + PyObject_GenericGetAttr, + 0, // tp_setattro + 0, // tp_as_buffer + Py_TPFLAGS_DEFAULT, + 0, // tp_doc + Dtool_StaticProperty_traverse, + 0, // tp_clear + 0, // tp_richcompare + 0, // tp_weaklistoffset + 0, // tp_iter + 0, // tp_iternext + 0, // tp_methods + 0, // tp_members + 0, // tp_getset + 0, // tp_base + 0, // tp_dict + (descrgetfunc)Dtool_StaticProperty_get, + (descrsetfunc)Dtool_StaticProperty_set, + 0, // tp_dictoffset + 0, // tp_init + 0, // tp_alloc + 0, // tp_new + 0, // tp_del + 0, // tp_is_gc + 0, // tp_bases + 0, // tp_mro + 0, // tp_cache + 0, // tp_subclasses + 0, // tp_weaklist + 0, // tp_del +#if PY_VERSION_HEX >= 0x02060000 + 0, // tp_version_tag +#endif +#if PY_VERSION_HEX >= 0x03040000 + 0, // tp_finalize +#endif +}; + #endif // HAVE_PYTHON diff --git a/dtool/src/interrogatedb/py_panda.h b/dtool/src/interrogatedb/py_panda.h index c2cc584914..05a787de9f 100644 --- a/dtool/src/interrogatedb/py_panda.h +++ b/dtool/src/interrogatedb/py_panda.h @@ -471,6 +471,9 @@ struct Dtool_SequenceWrapper { }; EXPCL_INTERROGATEDB extern PyTypeObject Dtool_SequenceWrapper_Type; +EXPCL_INTERROGATEDB extern PyTypeObject Dtool_StaticProperty_Type; + +EXPCL_INTERROGATEDB PyObject *Dtool_NewStaticProperty(PyTypeObject *obj, const PyGetSetDef *getset); /** * These functions check whether the arguments passed to a function conform to diff --git a/dtool/src/pystub/pystub.cxx b/dtool/src/pystub/pystub.cxx index d94287c038..c97cea7476 100644 --- a/dtool/src/pystub/pystub.cxx +++ b/dtool/src/pystub/pystub.cxx @@ -105,6 +105,7 @@ extern "C" { EXPCL_PYSTUB int PyObject_Cmp(...); EXPCL_PYSTUB int PyObject_Compare(...); EXPCL_PYSTUB int PyObject_Free(...); + EXPCL_PYSTUB int PyObject_GC_Del(...); EXPCL_PYSTUB int PyObject_GenericGetAttr(...); EXPCL_PYSTUB int PyObject_GenericSetAttr(...); EXPCL_PYSTUB int PyObject_GetAttrString(...); @@ -223,6 +224,7 @@ extern "C" { EXPCL_PYSTUB extern void *PyExc_SystemExit; EXPCL_PYSTUB extern void *PyExc_TypeError; EXPCL_PYSTUB extern void *PyExc_ValueError; + EXPCL_PYSTUB extern void *PyType_Type; EXPCL_PYSTUB extern void *_PyThreadState_Current; EXPCL_PYSTUB extern void *_Py_FalseStruct; EXPCL_PYSTUB extern void *_Py_NoneStruct; @@ -324,6 +326,7 @@ int PyObject_CallObject(...) { return 0; } int PyObject_Cmp(...) { return 0; } int PyObject_Compare(...) { return 0; } int PyObject_Free(...) { return 0; } +int PyObject_GC_Del(...) { return 0; } int PyObject_GenericGetAttr(...) { return 0; }; int PyObject_GenericSetAttr(...) { return 0; }; int PyObject_GetAttrString(...) { return 0; } @@ -448,6 +451,7 @@ void *PyExc_StopIteration = (void *)NULL; void *PyExc_SystemExit = (void *)NULL; void *PyExc_TypeError = (void *)NULL; void *PyExc_ValueError = (void *)NULL; +void *PyType_Type = (void *)NULL; void *_PyThreadState_Current = (void *)NULL; void *_Py_FalseStruct = (void *)NULL; void *_Py_NoneStruct = (void *)NULL; diff --git a/panda/src/audio/audioManager.h b/panda/src/audio/audioManager.h index 4ab88cc96b..6de21e15c4 100644 --- a/panda/src/audio/audioManager.h +++ b/panda/src/audio/audioManager.h @@ -172,6 +172,7 @@ PUBLISHED: virtual PN_stdfloat audio_3d_get_drop_off_factor() const; static Filename get_dls_pathname(); + MAKE_PROPERTY(dls_pathname, get_dls_pathname); virtual void output(ostream &out) const; virtual void write(ostream &out) const; diff --git a/panda/src/collide/collisionNode.h b/panda/src/collide/collisionNode.h index db731f7bcf..82c40a4d12 100644 --- a/panda/src/collide/collisionNode.h +++ b/panda/src/collide/collisionNode.h @@ -75,6 +75,7 @@ PUBLISHED: MAKE_PROPERTY(collider_sort, get_collider_sort, set_collider_sort); INLINE static CollideMask get_default_collide_mask(); + MAKE_PROPERTY(default_collide_mask, get_default_collide_mask); protected: virtual void compute_internal_bounds(CPT(BoundingVolume) &internal_bounds, diff --git a/panda/src/display/windowProperties.h b/panda/src/display/windowProperties.h index efb58255b6..bd5e964f52 100644 --- a/panda/src/display/windowProperties.h +++ b/panda/src/display/windowProperties.h @@ -49,6 +49,8 @@ PUBLISHED: static WindowProperties get_default(); static void set_default(const WindowProperties &default_properties); static void clear_default(); + MAKE_PROPERTY(config_properties, get_config_properties); + MAKE_PROPERTY(default, get_default, set_default); static WindowProperties size(int x_size, int y_size); diff --git a/panda/src/express/memoryUsage.h b/panda/src/express/memoryUsage.h index 87fc4f59d8..9742348cac 100644 --- a/panda/src/express/memoryUsage.h +++ b/panda/src/express/memoryUsage.h @@ -89,6 +89,19 @@ PUBLISHED: INLINE static void show_current_ages(); INLINE static void show_trend_ages(); +PUBLISHED: + MAKE_PROPERTY(tracking, is_tracking); + MAKE_PROPERTY(counting, is_counting); + MAKE_PROPERTY(current_cpp_size, get_current_cpp_size); + MAKE_PROPERTY(total_cpp_size, get_total_cpp_size); + + MAKE_PROPERTY(panda_heap_single_size, get_panda_heap_single_size); + MAKE_PROPERTY(panda_heap_array_size, get_panda_heap_array_size); + MAKE_PROPERTY(panda_heap_overhead, get_panda_heap_overhead); + MAKE_PROPERTY(panda_mmap_size, get_panda_mmap_size); + MAKE_PROPERTY(external_size, get_external_size); + MAKE_PROPERTY(total_size, get_total_size); + protected: virtual void overflow_heap_size(); diff --git a/panda/src/express/multifile.h b/panda/src/express/multifile.h index 5c6ec16feb..f290c98602 100644 --- a/panda/src/express/multifile.h +++ b/panda/src/express/multifile.h @@ -136,6 +136,7 @@ PUBLISHED: void ls(ostream &out = cout) const; static INLINE string get_magic_number(); + MAKE_PROPERTY(magic_number, get_magic_number); void set_header_prefix(const string &header_prefix); INLINE const string &get_header_prefix() const; diff --git a/panda/src/gobj/textureStage.h b/panda/src/gobj/textureStage.h index 4ba5835910..ccaa32e5d0 100644 --- a/panda/src/gobj/textureStage.h +++ b/panda/src/gobj/textureStage.h @@ -201,6 +201,8 @@ PUBLISHED: MAKE_PROPERTY(tex_view_offset, get_tex_view_offset, set_tex_view_offset); + MAKE_PROPERTY(default, get_default); + public: INLINE static UpdateSeq get_sort_seq(); diff --git a/panda/src/gobj/textureStagePool.h b/panda/src/gobj/textureStagePool.h index 5dc9012ea9..4db775251d 100644 --- a/panda/src/gobj/textureStagePool.h +++ b/panda/src/gobj/textureStagePool.h @@ -43,6 +43,7 @@ PUBLISHED: INLINE static void set_mode(Mode mode); INLINE static Mode get_mode(); + MAKE_PROPERTY(mode, get_mode, set_mode); INLINE static int garbage_collect(); INLINE static void list_contents(ostream &out); diff --git a/panda/src/gobj/vertexDataPage.h b/panda/src/gobj/vertexDataPage.h index 5149663e6b..4c7fd02bf2 100644 --- a/panda/src/gobj/vertexDataPage.h +++ b/panda/src/gobj/vertexDataPage.h @@ -64,6 +64,7 @@ PUBLISHED: INLINE static SimpleLru *get_global_lru(RamClass rclass); INLINE static SimpleLru *get_pending_lru(); INLINE static VertexDataSaveFile *get_save_file(); + MAKE_PROPERTY(save_file, get_save_file); INLINE bool save_to_disk(); diff --git a/panda/src/parametrics/ropeNode.h b/panda/src/parametrics/ropeNode.h index 1469ec6174..c60a1b9d0b 100644 --- a/panda/src/parametrics/ropeNode.h +++ b/panda/src/parametrics/ropeNode.h @@ -136,6 +136,23 @@ PUBLISHED: void reset_bound(const NodePath &rel_to); +PUBLISHED: + MAKE_PROPERTY(curve, get_curve, set_curve); + MAKE_PROPERTY(render_mode, get_render_mode, set_render_mode); + MAKE_PROPERTY(uv_mode, get_uv_mode, set_uv_mode); + MAKE_PROPERTY(uv_direction, get_uv_direction, set_uv_direction); + MAKE_PROPERTY(uv_scale, get_uv_scale, set_uv_scale); + MAKE_PROPERTY(normal_mode, get_normal_mode, set_normal_mode); + MAKE_PROPERTY(tube_up, get_tube_up, set_tube_up); + MAKE_PROPERTY(use_vertex_color, get_use_vertex_color, set_use_vertex_color); + MAKE_PROPERTY(vertex_color_dimension, get_vertex_color_dimension); + MAKE_PROPERTY(num_subdiv, get_num_subdiv, set_num_subdiv); + MAKE_PROPERTY(num_slices, get_num_slices, set_num_slices); + MAKE_PROPERTY(use_vertex_thickness, get_use_vertex_thickness, set_use_vertex_thickness); + MAKE_PROPERTY(vertex_thickness_dimension, get_vertex_thickness_dimension); + MAKE_PROPERTY(thickness, get_thickness, set_thickness); + MAKE_PROPERTY2(matrix, has_matrix, get_matrix, set_matrix, clear_matrix); + protected: virtual void compute_internal_bounds(CPT(BoundingVolume) &internal_bounds, int &internal_vertices, diff --git a/panda/src/pgraph/alphaTestAttrib.h b/panda/src/pgraph/alphaTestAttrib.h index 9b547ad2a7..d9aae7ec5b 100644 --- a/panda/src/pgraph/alphaTestAttrib.h +++ b/panda/src/pgraph/alphaTestAttrib.h @@ -58,6 +58,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/antialiasAttrib.h b/panda/src/pgraph/antialiasAttrib.h index 30a72bb535..af149af5f6 100644 --- a/panda/src/pgraph/antialiasAttrib.h +++ b/panda/src/pgraph/antialiasAttrib.h @@ -75,6 +75,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/audioVolumeAttrib.h b/panda/src/pgraph/audioVolumeAttrib.h index 3b2120462f..abf1216130 100644 --- a/panda/src/pgraph/audioVolumeAttrib.h +++ b/panda/src/pgraph/audioVolumeAttrib.h @@ -65,6 +65,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/auxBitplaneAttrib.h b/panda/src/pgraph/auxBitplaneAttrib.h index 56658f0aa2..26ce021110 100644 --- a/panda/src/pgraph/auxBitplaneAttrib.h +++ b/panda/src/pgraph/auxBitplaneAttrib.h @@ -85,6 +85,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/clipPlaneAttrib.h b/panda/src/pgraph/clipPlaneAttrib.h index e62c57857a..ca95233b79 100644 --- a/panda/src/pgraph/clipPlaneAttrib.h +++ b/panda/src/pgraph/clipPlaneAttrib.h @@ -123,6 +123,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/colorAttrib.h b/panda/src/pgraph/colorAttrib.h index 9df0878559..df8c1b84ce 100644 --- a/panda/src/pgraph/colorAttrib.h +++ b/panda/src/pgraph/colorAttrib.h @@ -69,6 +69,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/colorBlendAttrib.h b/panda/src/pgraph/colorBlendAttrib.h index 0530d077ce..641633561c 100644 --- a/panda/src/pgraph/colorBlendAttrib.h +++ b/panda/src/pgraph/colorBlendAttrib.h @@ -138,6 +138,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/colorScaleAttrib.h b/panda/src/pgraph/colorScaleAttrib.h index b5e986e239..e8dded108b 100644 --- a/panda/src/pgraph/colorScaleAttrib.h +++ b/panda/src/pgraph/colorScaleAttrib.h @@ -74,6 +74,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/colorWriteAttrib.h b/panda/src/pgraph/colorWriteAttrib.h index b7dcb7eb37..a426a01659 100644 --- a/panda/src/pgraph/colorWriteAttrib.h +++ b/panda/src/pgraph/colorWriteAttrib.h @@ -76,6 +76,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static TypeHandle get_class_type() { diff --git a/panda/src/pgraph/cullBinAttrib.h b/panda/src/pgraph/cullBinAttrib.h index f17a9876c6..b3590ac1c5 100644 --- a/panda/src/pgraph/cullBinAttrib.h +++ b/panda/src/pgraph/cullBinAttrib.h @@ -57,6 +57,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/cullFaceAttrib.h b/panda/src/pgraph/cullFaceAttrib.h index 5f6589a52a..1ed0450db2 100644 --- a/panda/src/pgraph/cullFaceAttrib.h +++ b/panda/src/pgraph/cullFaceAttrib.h @@ -69,6 +69,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/depthOffsetAttrib.h b/panda/src/pgraph/depthOffsetAttrib.h index 0976e2025a..9ae6a6ce6f 100644 --- a/panda/src/pgraph/depthOffsetAttrib.h +++ b/panda/src/pgraph/depthOffsetAttrib.h @@ -86,6 +86,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/depthTestAttrib.h b/panda/src/pgraph/depthTestAttrib.h index 6380a197d9..2dfa4763e1 100644 --- a/panda/src/pgraph/depthTestAttrib.h +++ b/panda/src/pgraph/depthTestAttrib.h @@ -53,6 +53,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/depthWriteAttrib.h b/panda/src/pgraph/depthWriteAttrib.h index 9cd96b40f9..d1cdbdc98f 100644 --- a/panda/src/pgraph/depthWriteAttrib.h +++ b/panda/src/pgraph/depthWriteAttrib.h @@ -59,6 +59,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/fogAttrib.h b/panda/src/pgraph/fogAttrib.h index 0076ccfc82..7f659b6336 100644 --- a/panda/src/pgraph/fogAttrib.h +++ b/panda/src/pgraph/fogAttrib.h @@ -54,6 +54,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/geomNode.h b/panda/src/pgraph/geomNode.h index a490a914b4..d17903027a 100644 --- a/panda/src/pgraph/geomNode.h +++ b/panda/src/pgraph/geomNode.h @@ -89,6 +89,7 @@ PUBLISHED: void write_verbose(ostream &out, int indent_level) const; INLINE static CollideMask get_default_collide_mask(); + MAKE_PROPERTY(default_collide_mask, get_default_collide_mask); public: virtual void output(ostream &out) const; diff --git a/panda/src/pgraph/lightAttrib.h b/panda/src/pgraph/lightAttrib.h index 25fc1fa68a..8d8b87bfb6 100644 --- a/panda/src/pgraph/lightAttrib.h +++ b/panda/src/pgraph/lightAttrib.h @@ -131,6 +131,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: // This data is only needed when reading from a bam file. diff --git a/panda/src/pgraph/lightRampAttrib.h b/panda/src/pgraph/lightRampAttrib.h index ccba3501cd..65a894e582 100644 --- a/panda/src/pgraph/lightRampAttrib.h +++ b/panda/src/pgraph/lightRampAttrib.h @@ -76,6 +76,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/logicOpAttrib.h b/panda/src/pgraph/logicOpAttrib.h index 81621b51dc..99ab79d029 100644 --- a/panda/src/pgraph/logicOpAttrib.h +++ b/panda/src/pgraph/logicOpAttrib.h @@ -75,6 +75,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/materialAttrib.h b/panda/src/pgraph/materialAttrib.h index 8da67c3ada..88c4a4363d 100644 --- a/panda/src/pgraph/materialAttrib.h +++ b/panda/src/pgraph/materialAttrib.h @@ -56,6 +56,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/pandaNode.h b/panda/src/pgraph/pandaNode.h index a0a2d0f9a3..a51a34c9dd 100644 --- a/panda/src/pgraph/pandaNode.h +++ b/panda/src/pgraph/pandaNode.h @@ -234,6 +234,8 @@ PUBLISHED: INLINE static DrawMask get_all_camera_mask(); INLINE bool is_overall_hidden() const; INLINE void set_overall_hidden(bool overall_hidden); + MAKE_PROPERTY(overall_bit, get_overall_bit); + MAKE_PROPERTY(all_camera_mask, get_all_camera_mask); MAKE_PROPERTY(overall_hidden, is_overall_hidden, set_overall_hidden); void adjust_draw_mask(DrawMask show_mask, diff --git a/panda/src/pgraph/renderAttrib.h b/panda/src/pgraph/renderAttrib.h index 1ffda64a16..aaa537ee5f 100644 --- a/panda/src/pgraph/renderAttrib.h +++ b/panda/src/pgraph/renderAttrib.h @@ -83,6 +83,7 @@ PUBLISHED: static bool validate_attribs(); virtual int get_slot() const=0; + MAKE_PROPERTY(slot, get_slot); enum PandaCompareFunc { // intentionally defined to match D3DCMPFUNC M_none=0, // alpha-test disabled (always-draw) diff --git a/panda/src/pgraph/renderModeAttrib.h b/panda/src/pgraph/renderModeAttrib.h index 631789dd60..21a32ee5de 100644 --- a/panda/src/pgraph/renderModeAttrib.h +++ b/panda/src/pgraph/renderModeAttrib.h @@ -92,6 +92,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/rescaleNormalAttrib.h b/panda/src/pgraph/rescaleNormalAttrib.h index 746db42717..589f5351cc 100644 --- a/panda/src/pgraph/rescaleNormalAttrib.h +++ b/panda/src/pgraph/rescaleNormalAttrib.h @@ -72,6 +72,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/scissorAttrib.h b/panda/src/pgraph/scissorAttrib.h index 48a4b87a7c..9ea128e765 100644 --- a/panda/src/pgraph/scissorAttrib.h +++ b/panda/src/pgraph/scissorAttrib.h @@ -70,6 +70,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/shadeModelAttrib.h b/panda/src/pgraph/shadeModelAttrib.h index 067555207a..8f8cd8a570 100644 --- a/panda/src/pgraph/shadeModelAttrib.h +++ b/panda/src/pgraph/shadeModelAttrib.h @@ -59,6 +59,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/shaderAttrib.h b/panda/src/pgraph/shaderAttrib.h index c719ce1791..7f704cc10f 100644 --- a/panda/src/pgraph/shaderAttrib.h +++ b/panda/src/pgraph/shaderAttrib.h @@ -158,6 +158,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static TypeHandle get_class_type() { diff --git a/panda/src/pgraph/stencilAttrib.h b/panda/src/pgraph/stencilAttrib.h index 9e9086928b..6b0b773581 100644 --- a/panda/src/pgraph/stencilAttrib.h +++ b/panda/src/pgraph/stencilAttrib.h @@ -155,6 +155,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/texGenAttrib.h b/panda/src/pgraph/texGenAttrib.h index 3cf0323edc..b9e1cd273a 100644 --- a/panda/src/pgraph/texGenAttrib.h +++ b/panda/src/pgraph/texGenAttrib.h @@ -114,6 +114,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/texMatrixAttrib.h b/panda/src/pgraph/texMatrixAttrib.h index 36e06b1549..f68238cf9f 100644 --- a/panda/src/pgraph/texMatrixAttrib.h +++ b/panda/src/pgraph/texMatrixAttrib.h @@ -101,6 +101,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/textureAttrib.h b/panda/src/pgraph/textureAttrib.h index efb1ad786d..aa9eea03c9 100644 --- a/panda/src/pgraph/textureAttrib.h +++ b/panda/src/pgraph/textureAttrib.h @@ -157,6 +157,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgraph/transparencyAttrib.h b/panda/src/pgraph/transparencyAttrib.h index ef890aa158..75af58c64e 100644 --- a/panda/src/pgraph/transparencyAttrib.h +++ b/panda/src/pgraph/transparencyAttrib.h @@ -70,6 +70,7 @@ PUBLISHED: virtual int get_slot() const { return get_class_slot(); } + MAKE_PROPERTY(class_slot, get_class_slot); public: static void register_with_read_factory(); diff --git a/panda/src/pgui/pgButton.h b/panda/src/pgui/pgButton.h index 494ed45428..ce0cb315c4 100644 --- a/panda/src/pgui/pgButton.h +++ b/panda/src/pgui/pgButton.h @@ -73,6 +73,7 @@ PUBLISHED: INLINE static string get_click_prefix(); INLINE string get_click_event(const ButtonHandle &button) const; + MAKE_PROPERTY(click_prefix, get_click_prefix); private: typedef pset Buttons; diff --git a/panda/src/pipeline/thread.h b/panda/src/pipeline/thread.h index 2240174f02..80844ea409 100644 --- a/panda/src/pipeline/thread.h +++ b/panda/src/pipeline/thread.h @@ -100,6 +100,16 @@ PUBLISHED: MAKE_PROPERTY(python_index, get_python_index); MAKE_PROPERTY(unique_id, get_unique_id); MAKE_PROPERTY(pipeline_stage, get_pipeline_stage, set_pipeline_stage); + + MAKE_PROPERTY(main_thread, get_main_thread); + MAKE_PROPERTY(external_thread, get_external_thread); + MAKE_PROPERTY(current_thread, get_current_thread); + MAKE_PROPERTY(current_pipeline_stage, get_current_pipeline_stage); + + MAKE_PROPERTY(threading_supported, is_threading_supported); + MAKE_PROPERTY(true_threads, is_true_threads); + MAKE_PROPERTY(simple_threads, is_simple_threads); + MAKE_PROPERTY(started, is_started); MAKE_PROPERTY(joinable, is_joinable); MAKE_PROPERTY(current_task, get_current_task); diff --git a/panda/src/speedtree/speedTreeNode.h b/panda/src/speedtree/speedTreeNode.h index 942312a2fb..76a4d16a5e 100644 --- a/panda/src/speedtree/speedTreeNode.h +++ b/panda/src/speedtree/speedTreeNode.h @@ -141,6 +141,9 @@ PUBLISHED: INLINE double get_time_delta() const; INLINE static void set_global_time_delta(double delta); INLINE static double get_global_time_delta(); + MAKE_PROPERTY(time_delta, get_time_delta, set_time_delta); + MAKE_PROPERTY(global_time_delta, get_global_time_delta, + set_global_time_delta); static bool authorize(const string &license = ""); diff --git a/panda/src/vision/webcamVideo.h b/panda/src/vision/webcamVideo.h index a1a74d3562..cdcf5e393d 100644 --- a/panda/src/vision/webcamVideo.h +++ b/panda/src/vision/webcamVideo.h @@ -28,6 +28,7 @@ PUBLISHED: static int get_num_options(); static PT(WebcamVideo) get_option(int n); MAKE_SEQ(get_options, get_num_options, get_option); + MAKE_SEQ_PROPERTY(options, get_num_options, get_option); INLINE int get_size_x() const; INLINE int get_size_y() const; From e3d8123940fe35e9b85ee10abe82f247c09c2a98 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Aug 2017 22:58:02 +0200 Subject: [PATCH 23/36] glsl: fix broken shadowMatrix as member of named light input Fixes: #157 --- panda/src/glstuff/glShaderContext_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 1afa11d2b8..f2c3b30a9b 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1431,7 +1431,7 @@ reflect_uniform(int i, char *name_buffer, GLsizei name_buflen) { bind._arg[0] = NULL; bind._dep[0] = Shader::SSD_general | Shader::SSD_transform; bind._part[1] = Shader::SMO_mat_constant_x_attrib; - bind._arg[1] = InternalName::make("shadowViewMatrix"); + bind._arg[1] = iname->get_parent()->append("shadowViewMatrix"); bind._dep[1] = Shader::SSD_general | Shader::SSD_shaderinputs | Shader::SSD_frame | Shader::SSD_view_transform; } else { bind._part[0] = Shader::SMO_mat_constant_x_attrib; From 4fae81947e67e903fdc587589de7f47bffa484bd Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Aug 2017 22:58:30 +0200 Subject: [PATCH 24/36] Fix regression (since 6f8b379) causing crash in flattening edge case --- panda/src/gobj/geom.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/panda/src/gobj/geom.cxx b/panda/src/gobj/geom.cxx index cf9a3a49b1..6019a4c577 100644 --- a/panda/src/gobj/geom.cxx +++ b/panda/src/gobj/geom.cxx @@ -683,6 +683,7 @@ unify_in_place(int max_indices, bool preserve_order) { int num_vertices = copy_primitives * total_vertices_per_primitive; nassertv(num_vertices > 0); { + smaller->set_index_type(reader.get_index_type()); GeomVertexArrayDataHandle writer(smaller->modify_vertices(), current_thread); writer.unclean_set_num_rows(num_vertices); memcpy(writer.get_write_pointer(), ptr, stride * (size_t)(num_vertices - num_unused_vertices_per_primitive)); From 114aee1d6aa7714225d5e32c2ab3779979cabea5 Mon Sep 17 00:00:00 2001 From: Younguk Kim Date: Fri, 4 Aug 2017 23:48:43 +0900 Subject: [PATCH 25/36] Add additional Windows SDK path Windows 10 SDK binary files are installed in versioned folder from Creator Update (10.0.15063.0) --- makepanda/makepandacore.py | 1 + 1 file changed, 1 insertion(+) diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 9f42b92580..9425794121 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -2422,6 +2422,7 @@ def SetupVisualStudioEnviron(): winsdk_ver = SDK["MSPLATFORM_VERSION"] if winsdk_ver.startswith('10.'): AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin\\" + arch) + AddToPathEnv("PATH", SDK["MSPLATFORM"] + "bin\\" + winsdk_ver + "\\" + arch) # Windows Kit 10 introduces the "universal CRT". inc_dir = SDK["MSPLATFORM"] + "Include\\" + winsdk_ver + "\\" From 3e6dc3b046f7ea519859012e56113d66acf242ba Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 7 Aug 2017 23:32:45 +0200 Subject: [PATCH 26/36] Fix Python 3.2 compilation error --- dtool/src/interrogatedb/py_panda.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dtool/src/interrogatedb/py_panda.cxx b/dtool/src/interrogatedb/py_panda.cxx index 1abb34100b..7b920979ef 100644 --- a/dtool/src/interrogatedb/py_panda.cxx +++ b/dtool/src/interrogatedb/py_panda.cxx @@ -1148,7 +1148,9 @@ Dtool_NewStaticProperty(PyTypeObject *type, const PyGetSetDef *getset) { #if PY_MAJOR_VERSION >= 3 descr->d_common.d_type = type; descr->d_common.d_name = PyUnicode_InternFromString(getset->name); +#if PY_VERSION_HEX >= 0x03030000 descr->d_common.d_qualname = nullptr; +#endif #else descr->d_type = type; descr->d_name = PyString_InternFromString(getset->name); From 99cf21acecb6956eff46f68273536d17283fd78e Mon Sep 17 00:00:00 2001 From: Younguk Kim Date: Tue, 22 Aug 2017 23:42:42 +0900 Subject: [PATCH 27/36] Fix failure to load DLL with unicode path - Change LoadLibrary API to unicode version on Windows --- dtool/src/dtoolutil/load_dso.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dtool/src/dtoolutil/load_dso.cxx b/dtool/src/dtoolutil/load_dso.cxx index ae224d3617..ba63eee044 100644 --- a/dtool/src/dtoolutil/load_dso.cxx +++ b/dtool/src/dtoolutil/load_dso.cxx @@ -47,20 +47,20 @@ load_dso(const DSearchPath &path, const Filename &filename) { if (!abspath.is_regular_file()) { return NULL; } - string os_specific = abspath.to_os_specific(); + wstring os_specific_w = abspath.to_os_specific_w(); // Try using LoadLibraryEx, if possible. - typedef HMODULE (WINAPI *tLoadLibraryEx)(LPCTSTR, HANDLE, DWORD); + typedef HMODULE (WINAPI *tLoadLibraryEx)(LPCWSTR, HANDLE, DWORD); tLoadLibraryEx pLoadLibraryEx; HINSTANCE hLib = LoadLibrary("kernel32.dll"); if (hLib) { - pLoadLibraryEx = (tLoadLibraryEx)GetProcAddress(hLib, "LoadLibraryExA"); + pLoadLibraryEx = (tLoadLibraryEx)GetProcAddress(hLib, "LoadLibraryExW"); if (pLoadLibraryEx) { - return pLoadLibraryEx(os_specific.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); + return pLoadLibraryEx(os_specific_w.c_str(), NULL, LOAD_WITH_ALTERED_SEARCH_PATH); } } - return LoadLibrary(os_specific.c_str()); + return LoadLibraryW(os_specific_w.c_str()); } bool From bbdc5d234153f9a617820a6a8d923d5ebf792b5a Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 22 Aug 2017 20:04:59 +0200 Subject: [PATCH 28/36] pnmimage: mark many heavy methods as BLOCKING to release GIL --- panda/src/pnmimage/pnmImage.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/panda/src/pnmimage/pnmImage.h b/panda/src/pnmimage/pnmImage.h index 2c45492029..2f7b653185 100644 --- a/panda/src/pnmimage/pnmImage.h +++ b/panda/src/pnmimage/pnmImage.h @@ -124,8 +124,8 @@ PUBLISHED: void make_grayscale(float rc, float gc, float bc); INLINE void make_rgb(); - void premultiply_alpha(); - void unpremultiply_alpha(); + BLOCKING void premultiply_alpha(); + BLOCKING void unpremultiply_alpha(); BLOCKING void reverse_rows(); BLOCKING void flip(bool flip_x, bool flip_y, bool transpose); @@ -244,27 +244,27 @@ PUBLISHED: // The bodies for the non-inline *_filter() functions can be found in the // file pnm-image-filter.cxx. - INLINE void box_filter(float radius = 1.0); - INLINE void gaussian_filter(float radius = 1.0); + BLOCKING INLINE void box_filter(float radius = 1.0); + BLOCKING INLINE void gaussian_filter(float radius = 1.0); - void unfiltered_stretch_from(const PNMImage ©); - void box_filter_from(float radius, const PNMImage ©); - void gaussian_filter_from(float radius, const PNMImage ©); - void quick_filter_from(const PNMImage ©, - int xborder = 0, int yborder = 0); + BLOCKING void unfiltered_stretch_from(const PNMImage ©); + BLOCKING void box_filter_from(float radius, const PNMImage ©); + BLOCKING void gaussian_filter_from(float radius, const PNMImage ©); + BLOCKING void quick_filter_from(const PNMImage ©, + int xborder = 0, int yborder = 0); void make_histogram(Histogram &hist); - void perlin_noise_fill(float sx, float sy, int table_size = 256, - unsigned long seed = 0); + BLOCKING void perlin_noise_fill(float sx, float sy, int table_size = 256, + unsigned long seed = 0); void perlin_noise_fill(StackedPerlinNoise2 &perlin); void remix_channels(const LMatrix4 &conv); - INLINE void gamma_correct(float from_gamma, float to_gamma); - INLINE void gamma_correct_alpha(float from_gamma, float to_gamma); - INLINE void apply_exponent(float gray_exponent); - INLINE void apply_exponent(float gray_exponent, float alpha_exponent); - INLINE void apply_exponent(float red_exponent, float green_exponent, float blue_exponent); - void apply_exponent(float red_exponent, float green_exponent, float blue_exponent, float alpha_exponent); + BLOCKING INLINE void gamma_correct(float from_gamma, float to_gamma); + BLOCKING INLINE void gamma_correct_alpha(float from_gamma, float to_gamma); + BLOCKING INLINE void apply_exponent(float gray_exponent); + BLOCKING INLINE void apply_exponent(float gray_exponent, float alpha_exponent); + BLOCKING INLINE void apply_exponent(float red_exponent, float green_exponent, float blue_exponent); + BLOCKING void apply_exponent(float red_exponent, float green_exponent, float blue_exponent, float alpha_exponent); LRGBColorf get_average_xel() const; LColorf get_average_xel_a() const; From b9437316b441f732ad56309e7d908d2799d2a646 Mon Sep 17 00:00:00 2001 From: kamgha Date: Sat, 26 Aug 2017 03:54:29 +0200 Subject: [PATCH 29/36] Add snake-case function names for 'threading2'-module Closes: #165 --- direct/src/stdpy/threading2.py | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/direct/src/stdpy/threading2.py b/direct/src/stdpy/threading2.py index 9beee770c0..d041faaa2b 100644 --- a/direct/src/stdpy/threading2.py +++ b/direct/src/stdpy/threading2.py @@ -24,9 +24,18 @@ from time import time as _time from traceback import format_exc as _format_exc # Rename some stuff so "from threading import *" is safe -__all__ = ['activeCount', 'Condition', 'currentThread', 'enumerate', 'Event', - 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', - 'Timer', 'setprofile', 'settrace', 'local', 'stack_size'] +__all__ = [ + 'enumerate', 'active_count', 'activeCount', + 'Condition', + 'current_thread', 'currentThread', + 'Event', + 'Lock', 'RLock', + 'Semaphore', 'BoundedSemaphore', + 'Thread', + 'Timer', + 'local', + 'setprofile', 'settrace', 'stack_size' + ] _start_new_thread = thread.start_new_thread _allocate_lock = thread.allocate_lock @@ -581,10 +590,12 @@ class Thread(_Verbose): assert self.__initialized, "Thread.__init__() not called" self.__name = str(name) - def isAlive(self): + def is_alive(self): assert self.__initialized, "Thread.__init__() not called" return self.__started and not self.__stopped + isAlive = is_alive + def isDaemon(self): assert self.__initialized, "Thread.__init__() not called" return self.__daemonic @@ -692,19 +703,23 @@ class _DummyThread(Thread): # Global API functions -def currentThread(): +def current_thread(): try: return _active[_get_ident()] except KeyError: - ##print "currentThread(): no current thread for", _get_ident() + ##print "current_thread(): no current thread for", _get_ident() return _DummyThread() -def activeCount(): +currentThread = current_thread + +def active_count(): _active_limbo_lock.acquire() count = len(_active) + len(_limbo) _active_limbo_lock.release() return count +activeCount = active_count + def enumerate(): _active_limbo_lock.acquire() active = list(_active.values()) + list(_limbo.values()) From 2d1f0e48664099c8c9ff60cd6f5e00bebd080e0a Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 27 Aug 2017 16:48:13 +0200 Subject: [PATCH 30/36] stdpy: update threading modules --- direct/src/stdpy/thread.py | 33 +++++++++++++---- direct/src/stdpy/threading.py | 16 ++++++--- direct/src/stdpy/threading2.py | 66 +++++++++++++++++----------------- 3 files changed, 72 insertions(+), 43 deletions(-) diff --git a/direct/src/stdpy/thread.py b/direct/src/stdpy/thread.py index 05090e65d8..07ed6dad3e 100644 --- a/direct/src/stdpy/thread.py +++ b/direct/src/stdpy/thread.py @@ -11,18 +11,32 @@ __all__ = [ 'interrupt_main', 'exit', 'allocate_lock', 'get_ident', 'stack_size', + 'force_yield', 'consider_yield', 'forceYield', 'considerYield', + 'TIMEOUT_MAX' ] from panda3d import core +import sys + +if sys.platform == "win32": + TIMEOUT_MAX = float(0xffffffff // 1000) +else: + TIMEOUT_MAX = float(0x7fffffffffffffff // 1000000000) # These methods are defined in Panda, and are particularly useful if # you may be running in Panda's SIMPLE_THREADS compilation mode. -forceYield = core.Thread.forceYield -considerYield = core.Thread.considerYield +force_yield = core.Thread.force_yield +consider_yield = core.Thread.consider_yield -class error(Exception): - pass +forceYield = force_yield +considerYield = consider_yield + +if sys.version_info >= (3, 3): + error = RuntimeError +else: + class error(Exception): + pass class LockType: """ Implements a mutex lock. Instead of directly subclassing @@ -36,13 +50,18 @@ class LockType: self.__cvar = core.ConditionVar(self.__lock) self.__locked = False - def acquire(self, waitflag = 1): + def acquire(self, waitflag = 1, timeout = -1): self.__lock.acquire() try: if self.__locked and not waitflag: return False - while self.__locked: - self.__cvar.wait() + + if timeout >= 0: + while self.__locked: + self.__cvar.wait(timeout) + else: + while self.__locked: + self.__cvar.wait() self.__locked = True return True diff --git a/direct/src/stdpy/threading.py b/direct/src/stdpy/threading.py index 5c8af3cc62..1bd0bdd9c8 100644 --- a/direct/src/stdpy/threading.py +++ b/direct/src/stdpy/threading.py @@ -35,11 +35,15 @@ __all__ = [ 'Event', 'Timer', 'local', - 'current_thread', 'currentThread', - 'enumerate', 'active_count', 'activeCount', + 'current_thread', + 'main_thread', + 'enumerate', 'active_count', 'settrace', 'setprofile', 'stack_size', + 'TIMEOUT_MAX', ] +TIMEOUT_MAX = _thread.TIMEOUT_MAX + local = _thread._local _newname = _thread._newname @@ -111,8 +115,7 @@ class Thread(ThreadBase): def is_alive(self): return self.__thread.isStarted() - def isAlive(self): - return self.__thread.isStarted() + isAlive = is_alive def start(self): if self.__thread.isStarted(): @@ -379,6 +382,10 @@ def current_thread(): t = core.Thread.getCurrentThread() return _thread._get_thread_wrapper(t, _create_thread_wrapper) +def main_thread(): + t = core.Thread.getMainThread() + return _thread._get_thread_wrapper(t, _create_thread_wrapper) + currentThread = current_thread def enumerate(): @@ -394,6 +401,7 @@ def enumerate(): def active_count(): return len(enumerate()) + activeCount = active_count _settrace_func = None diff --git a/direct/src/stdpy/threading2.py b/direct/src/stdpy/threading2.py index d041faaa2b..6e25f5208c 100644 --- a/direct/src/stdpy/threading2.py +++ b/direct/src/stdpy/threading2.py @@ -15,7 +15,7 @@ implementation. """ import sys as _sys -from direct.stdpy import thread +from direct.stdpy import thread as _thread from direct.stdpy.thread import stack_size, _newname, _local as local from panda3d import core _sleep = core.Thread.sleep @@ -23,25 +23,19 @@ _sleep = core.Thread.sleep from time import time as _time from traceback import format_exc as _format_exc -# Rename some stuff so "from threading import *" is safe -__all__ = [ - 'enumerate', 'active_count', 'activeCount', - 'Condition', - 'current_thread', 'currentThread', - 'Event', - 'Lock', 'RLock', - 'Semaphore', 'BoundedSemaphore', - 'Thread', - 'Timer', - 'local', - 'setprofile', 'settrace', 'stack_size' - ] +__all__ = ['get_ident', 'active_count', 'Condition', 'current_thread', + 'enumerate', 'main_thread', 'TIMEOUT_MAX', + 'Event', 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', + 'Timer', 'ThreadError', + 'setprofile', 'settrace', 'local', 'stack_size'] -_start_new_thread = thread.start_new_thread -_allocate_lock = thread.allocate_lock -_get_ident = thread.get_ident -ThreadError = thread.error -del thread +# Rename some stuff so "from threading import *" is safe +_start_new_thread = _thread.start_new_thread +_allocate_lock = _thread.allocate_lock +get_ident = _thread.get_ident +ThreadError = _thread.error +TIMEOUT_MAX = _thread.TIMEOUT_MAX +del _thread # Debug support (adapted from ihooks.py). @@ -455,7 +449,7 @@ class Thread(_Verbose): try: self.__started = True _active_limbo_lock.acquire() - _active[_get_ident()] = self + _active[get_ident()] = self del _limbo[self] _active_limbo_lock.release() if __debug__: @@ -546,7 +540,7 @@ class Thread(_Verbose): _active_limbo_lock.acquire() try: try: - del _active[_get_ident()] + del _active[get_ident()] except KeyError: if 'dummy_threading' not in _sys.modules: raise @@ -645,7 +639,7 @@ class _MainThread(Thread): Thread.__init__(self, name="MainThread") self._Thread__started = True _active_limbo_lock.acquire() - _active[_get_ident()] = self + _active[get_ident()] = self _active_limbo_lock.release() def _set_daemon(self): @@ -664,12 +658,6 @@ class _MainThread(Thread): self._note("%s: exiting", self) self._Thread__delete() -def _pickSomeNonDaemonThread(): - for t in enumerate(): - if not t.isDaemon() and t.isAlive(): - return t - return None - # Dummy thread class to represent threads not started here. # These aren't garbage collected when they die, nor can they be waited for. @@ -691,7 +679,7 @@ class _DummyThread(Thread): self._Thread__started = True _active_limbo_lock.acquire() - _active[_get_ident()] = self + _active[get_ident()] = self _active_limbo_lock.release() def _set_daemon(self): @@ -705,9 +693,9 @@ class _DummyThread(Thread): def current_thread(): try: - return _active[_get_ident()] + return _active[get_ident()] except KeyError: - ##print "current_thread(): no current thread for", _get_ident() + ##print "current_thread(): no current thread for", get_ident() return _DummyThread() currentThread = current_thread @@ -732,7 +720,21 @@ def enumerate(): # and make it available for the interpreter # (Py_Main) as threading._shutdown. -_shutdown = _MainThread()._exitfunc +_main_thread = _MainThread() +_shutdown = _main_thread._exitfunc + +def _pickSomeNonDaemonThread(): + for t in enumerate(): + if not t.isDaemon() and t.isAlive(): + return t + return None + +def main_thread(): + """Return the main thread object. + In normal conditions, the main thread is the thread from which the + Python interpreter was started. + """ + return _main_thread # get thread-local implementation, either from the thread # module, or from the python fallback From 1dc02f6a2887c754cfdd090b3f0ed9fdbeab3d7f Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 27 Aug 2017 16:55:26 +0200 Subject: [PATCH 31/36] stdpy: fix direct.stdpy.threading cleanup issue after thread runs Fixes: #164 --- direct/src/stdpy/threading.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/direct/src/stdpy/threading.py b/direct/src/stdpy/threading.py index 1bd0bdd9c8..2a1c875539 100644 --- a/direct/src/stdpy/threading.py +++ b/direct/src/stdpy/threading.py @@ -102,7 +102,14 @@ class Thread(ThreadBase): self.__dict__['daemon'] = current.daemon self.__dict__['name'] = name - self.__thread = core.PythonThread(self.run, None, name, name) + def call_run(): + # As soon as the thread is done, break the circular reference. + try: + self.run() + finally: + self.__thread = None + + self.__thread = core.PythonThread(call_run, None, name, name) threadId = _thread._add_thread(self.__thread, weakref.proxy(self)) self.__dict__['ident'] = threadId @@ -113,12 +120,12 @@ class Thread(ThreadBase): _thread._remove_thread_id(self.ident) def is_alive(self): - return self.__thread.isStarted() + return self.__thread is not None and self.__thread.is_started() isAlive = is_alive def start(self): - if self.__thread.isStarted(): + if self.__thread is None or self.__thread.is_started(): raise RuntimeError if not self.__thread.start(core.TPNormal, True): @@ -393,7 +400,7 @@ def enumerate(): _thread._threadsLock.acquire() try: for thread, locals, wrapper in list(_thread._threads.values()): - if wrapper and thread.isStarted(): + if wrapper and wrapper.is_alive(): tlist.append(wrapper) return tlist finally: From c66b4792d745aacb4a848465a767edf87e7ab6b9 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 29 Aug 2017 23:43:51 +0200 Subject: [PATCH 32/36] stdpy: protect against thread error when interpreter shuts down --- direct/src/stdpy/thread.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/src/stdpy/thread.py b/direct/src/stdpy/thread.py index 07ed6dad3e..d6146ec997 100644 --- a/direct/src/stdpy/thread.py +++ b/direct/src/stdpy/thread.py @@ -221,6 +221,10 @@ def _get_thread_locals(thread, i): def _remove_thread_id(threadId): """ Removes the thread with the indicated ID from the thread list. """ + # On interpreter shutdown, Python may set module globals to None. + if _threadsLock is None or _threads is None: + return + _threadsLock.acquire() try: thread, locals, wrapper = _threads[threadId] From a925e0bcd909e686600da9e08722f2d7f42b1ab8 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 29 Aug 2017 23:51:15 +0200 Subject: [PATCH 33/36] x11: fix loading 24-bpp ico/cur image alpha with width 24 --- panda/src/x11display/x11GraphicsWindow.cxx | 24 +++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index 17a8121efc..8efbf01b5d 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -2280,9 +2280,11 @@ read_ico(istream &ico) { if (!ico.good()) goto cleanup; } + int and_stride = ((infoHeader.width >> 3) + 3) & ~0x03; + // Read in the pixel data. xorBmpSize = (infoHeader.width * (infoHeader.height / 2) * bitsPerPixel) / 8; - andBmpSize = (infoHeader.width * (infoHeader.height / 2)) / 8; + andBmpSize = and_stride * (infoHeader.height / 2); curXor = xorBmp = new char[xorBmpSize]; curAnd = andBmp = new char[andBmpSize]; ico.read(xorBmp, xorBmpSize); @@ -2330,21 +2332,15 @@ read_ico(istream &ico) { // Pack each of the three bytes into a single color, BGR -> 0RGB for (i = image->height - 1; i >= 0; i--) { for (j = 0; j < image->width; j++) { - image->pixels[(i * image->width) + j] = (*(curXor + 2) << 16) + - (*(curXor + 1) << 8) + (*curXor); + shift = 7 - (j & 0x7); + uint32_t alpha = (curAnd[j >> 3] & (1 << shift)) ? 0 : 0xff000000U; + image->pixels[(i * image->width) + j] = (uint8_t)curXor[0] + | ((uint8_t)curXor[1] << 8u) + | ((uint8_t)curXor[2] << 16u) + | alpha; curXor += 3; } - - // Set the alpha byte properly according to the andBmp. - for (j = 0; j < image->width; j += 8) { - for (k = 0; k < 8; k++) { - shift = 7 - k; - image->pixels[(i * image->width) + j + k] |= - ((*curAnd & (1 << shift)) >> shift) ? 0x0 : (0xff << 24); - } - - curAnd++; - } + curAnd += and_stride; } break; From 1f017997f9d298fe6baaba81ac6f909142d46138 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 30 Aug 2017 13:00:02 +0200 Subject: [PATCH 34/36] stdpy: fix issues with direct.stdpy.threading thread cleanup Fixes: #164 --- direct/src/stdpy/thread.py | 9 +++++---- direct/src/stdpy/threading.py | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/direct/src/stdpy/thread.py b/direct/src/stdpy/thread.py index d6146ec997..c10675dd4c 100644 --- a/direct/src/stdpy/thread.py +++ b/direct/src/stdpy/thread.py @@ -227,10 +227,11 @@ def _remove_thread_id(threadId): _threadsLock.acquire() try: - thread, locals, wrapper = _threads[threadId] - assert thread.getPythonIndex() == threadId - del _threads[threadId] - thread.setPythonIndex(-1) + if threadId in _threads: + thread, locals, wrapper = _threads[threadId] + assert thread.getPythonIndex() == threadId + del _threads[threadId] + thread.setPythonIndex(-1) finally: _threadsLock.release() diff --git a/direct/src/stdpy/threading.py b/direct/src/stdpy/threading.py index 2a1c875539..b4cb6d9228 100644 --- a/direct/src/stdpy/threading.py +++ b/direct/src/stdpy/threading.py @@ -108,6 +108,7 @@ class Thread(ThreadBase): self.run() finally: self.__thread = None + _thread._remove_thread_id(self.ident) self.__thread = core.PythonThread(call_run, None, name, name) threadId = _thread._add_thread(self.__thread, weakref.proxy(self)) @@ -120,15 +121,17 @@ class Thread(ThreadBase): _thread._remove_thread_id(self.ident) def is_alive(self): - return self.__thread is not None and self.__thread.is_started() + thread = self.__thread + return thread is not None and thread.is_started() isAlive = is_alive def start(self): - if self.__thread is None or self.__thread.is_started(): + thread = self.__thread + if thread is None or thread.is_started(): raise RuntimeError - if not self.__thread.start(core.TPNormal, True): + if not thread.start(core.TPNormal, True): raise RuntimeError def run(self): @@ -142,8 +145,12 @@ class Thread(ThreadBase): def join(self, timeout = None): # We don't support a timed join here, sorry. assert timeout is None - self.__thread.join() - self.__thread = None + thread = self.__thread + if thread is not None: + thread.join() + # Clear the circular reference. + self.__thread = None + _thread._remove_thread_id(self.ident) def setName(self, name): self.__dict__['name'] = name From f09d767c6ec30fff501a1decd25e4277172d727e Mon Sep 17 00:00:00 2001 From: kamgha Date: Thu, 31 Aug 2017 13:03:17 +0200 Subject: [PATCH 35/36] pnmimagetypes: introduce png-compression-level PRC variable --- panda/src/pnmimagetypes/config_pnmimagetypes.cxx | 12 ++++++++++-- panda/src/pnmimagetypes/config_pnmimagetypes.h | 1 + panda/src/pnmimagetypes/pnmFileTypePNG.cxx | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/panda/src/pnmimagetypes/config_pnmimagetypes.cxx b/panda/src/pnmimagetypes/config_pnmimagetypes.cxx index c498951f3f..2fc23d574a 100644 --- a/panda/src/pnmimagetypes/config_pnmimagetypes.cxx +++ b/panda/src/pnmimagetypes/config_pnmimagetypes.cxx @@ -81,6 +81,7 @@ ConfigVariableInt img_size ("img-size", 0, PRC_DESC("If an IMG file without a header is loaded (e.g. img-header-type " "is set to 'none', this specifies the fixed x y size of the image.")); + ConfigVariableInt jpeg_quality ("jpeg-quality", 95, PRC_DESC("Set this to the quality percentage for writing JPEG files. 95 is " @@ -88,10 +89,17 @@ ConfigVariableInt jpeg_quality "significantly better quality, but do lead to significantly greater " "size).")); +ConfigVariableInt png_compression_level +("png-compression-level", 6, + PRC_DESC("Set this to the desired compression level for writing PNG images. " + "Valid values are 0 (no compression), or 1 (compression, best " + "speed) to 9 (best compression). Default is 6. PNG compression is " + "lossless.")); + ConfigVariableBool png_palette ("png-palette", true, - PRC_DESC("Set this true to allow writing palette-based PNG images when possible.")); - + PRC_DESC("Set this true to allow writing palette-based PNG images when " + "possible.")); ConfigVariableInt bmp_bpp ("bmp-bpp", 0, diff --git a/panda/src/pnmimagetypes/config_pnmimagetypes.h b/panda/src/pnmimagetypes/config_pnmimagetypes.h index dca563a683..95ed9224a5 100644 --- a/panda/src/pnmimagetypes/config_pnmimagetypes.h +++ b/panda/src/pnmimagetypes/config_pnmimagetypes.h @@ -57,6 +57,7 @@ extern ConfigVariableBool tga_grayscale; extern ConfigVariableInt jpeg_quality; +extern ConfigVariableInt png_compression_level; extern ConfigVariableBool png_palette; extern ConfigVariableInt bmp_bpp; diff --git a/panda/src/pnmimagetypes/pnmFileTypePNG.cxx b/panda/src/pnmimagetypes/pnmFileTypePNG.cxx index 49cbc2faba..bf4ab4ac31 100644 --- a/panda/src/pnmimagetypes/pnmFileTypePNG.cxx +++ b/panda/src/pnmimagetypes/pnmFileTypePNG.cxx @@ -526,6 +526,10 @@ write_data(xel *array, xelval *alpha_data) { png_set_write_fn(_png, (void *)this, png_write_data, png_flush_data); + // The compression level corresponds directly to the compression levels for + // zlib. + png_set_compression_level(_png, png_compression_level); + // First, write the header. int true_bit_depth = pm_maxvaltobits(_maxval); From 82eec0302b716eb724976d4a0ad230e9458bfcb8 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 4 Sep 2017 13:03:37 +0200 Subject: [PATCH 36/36] ShaderGenerator: fix point light shadow regression Fixes: #167 --- panda/src/display/graphicsStateGuardian.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index 0d337a803e..f0d807ffce 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -1455,8 +1455,8 @@ fetch_specified_part(Shader::ShaderMatInput part, InternalName *name, t.set_row(2, LVecBase4(d, cutoff)); } else if (node->is_of_type(PointLight::get_class_type())) { - t.set_cell(1, 3, lens->get_near()); - t.set_cell(3, 3, lens->get_far()); + t.set_cell(1, 3, lens->get_far()); + t.set_cell(3, 3, lens->get_near()); if (node->is_of_type(SphereLight::get_class_type())) { t.set_cell(2, 3, ((const SphereLight *)node)->get_radius());