Marius Kintel
c3736b0f30
#1276 Let FileModule::instantiate() catch all module recursions
2015-04-13 12:45:30 -04:00
Marius Kintel
b6558889b4
bugfix: Don't return a temporary string from exception::what
2015-02-10 18:59:11 -05:00
Marius Kintel
597d07f357
Catch infinite recursion in top-level assignments. Fixes #1192
2015-01-28 20:07:15 -05:00
Torsten Paul
407da2ea8c
Move catch for function recursion detection.
...
Catching this at ModuleInstantiation::evaluate() should ensure the whole
function call is terminated with the first exception. Otherwise function
calls with multiple recursion points (e.g. function f(x) = f(x) + f(x);)
will still descent into the recursion multiple times.
2014-12-04 19:40:15 +01:00
Marius Kintel
be595efd31
Merge remote-tracking branch 'origin/master' into issue409
...
Conflicts:
src/mainwin.cc
src/module.cc
2014-12-01 17:07:01 -05:00
Torsten Paul
ef9f2f3289
Retain FileContext to lookup $vp{rtd} variables after compilation ( fixes #949 ).
2014-11-30 16:37:17 +01:00
Marius Kintel
4cd712d24d
Merge remote-tracking branch 'origin/master' into stack-size-hack
...
Conflicts:
src/context.h
src/control.cc
src/evalcontext.h
src/localscope.cc
src/module.cc
2014-11-25 11:25:37 -05:00
Marius Kintel
23c9dee265
bugfix: Correctly handle else scopes, handle overrides inside assign scopes
2014-11-25 00:45:00 -05:00
Marius Kintel
d8010a0659
Take a copy of the name of the recursive component, don't use a pointer to a temporary string
2014-11-24 18:25:38 -05:00
Marius Kintel
e0fbeb8d95
Use StackCheck to detect module recursion
2014-11-24 18:12:58 -05:00
Marius Kintel
5debac7de0
Throw and catch RecursionException on module recursion
2014-11-24 17:44:39 -05:00
Marius Kintel
ab96a82629
Minor cleanup of recursion exception handling
2014-11-24 17:30:05 -05:00
Marius Kintel
406e6e1bac
#409 Pass Value objects as shared_ptr instances instead of by Value to battle excess stack usage
2014-11-23 00:59:17 -05:00
Marius Kintel
ea1d561c46
Support variable assignment in local blocks. This should fix #347 but more testing is needed
2014-11-17 00:57:36 -05:00
Marius Kintel
f108798c00
Output debug info only in debug mode
2014-06-26 15:31:22 -04:00
Marius Kintel
2cba2a1b55
Merge branch 'master' into text-module
...
Conflicts:
scripts/macosx-build-homebrew.sh
scripts/mingw-x-build-dependencies.sh
scripts/uni-build-dependencies.sh
scripts/uni-get-dependencies.sh
src/GeometryEvaluator.h
src/MainWindow.ui
src/clipper-utils.h
src/mainwin.cc
tests/CMakeLists.txt
2014-04-26 22:08:31 -04:00
Torsten Paul
d8a1b5f7eb
Convert Assignment to use shared pointers for Expressions ( fixes #709 ).
2014-03-30 19:16:50 +02:00
Marius Kintel
6f4cf3ebec
Fixed a bug failing to detect changes in underlying libraries. Should improve some of the issues reported in #181
2014-02-10 02:19:56 -05:00
Marius Kintel
603ce02420
Cleaned up some module cache misbehaviors. Fixes #535
2014-02-09 17:17:10 -05:00
Torsten Paul
bb45e7e52a
Add implementation of text() module.
2014-02-02 18:00:44 -05:00
Marius Kintel
0cacb434fc
bugfix related to #460 : removed duplicate initializeModule()
2013-10-08 23:40:16 -04:00
Marius Kintel
b4e80581ca
Merge branch 'bom-tree-std-stack' of git://github.com/steelman/openscad into steelman-bom-tree-std-stack
...
Conflicts:
src/module.cc
2013-10-04 15:13:26 -07:00
Marius Kintel
a7396cc36f
Fixes two problems related to : lookup was dynamic rather than lexical, assignment was done after all local variables causing it not to be copyable
2013-08-21 01:40:21 -04:00
Łukasz Stelmach
400d28d753
Enable module stack introspection from within an SCAD script
...
The _current_module and _parent_module variables have been replaced
by a built-in function parent_module(n). It takes one numeric parameter n,
and returns n-th element from the module stack. If no argument provided,
n defaults to 1 and the function returns the name of the direct parent
module. If n is equal 0 current module name is returned.
2013-08-18 17:19:49 +02:00
Łukasz Stelmach
d67e012916
Introduce '_current_module' and '_parent_module' variables
...
Add two built-in variables that provide access to the names
of the current and the previously instantiated modules.
Having these variables simplifies generation of BOMs and assembly
graphs (e.g. with GraphViz).
[std::stack]
2013-08-17 16:22:00 +02:00
Marius Kintel
bd0248e109
Fixed a bug where changing a file during a large automatic reload could cause a crash
2013-06-13 01:16:26 -04:00
Marius Kintel
626047f26d
Minor refactoring of include checks
2013-06-05 22:25:58 -04:00
Marius Kintel
3bb22f9c53
Increase recursion limit to 1000
2013-06-05 20:28:10 -04:00
Marius Kintel
362d689305
Don't auto-reload missing files, reduce warning output from periodically called functions
2013-06-05 20:25:57 -04:00
Marius Kintel
e4197c1b58
Dump the else part of if-else blocks if it has any content. Part of #384
2013-06-01 16:05:09 -04:00
Marius Kintel
0967a26bff
Support locating previously missing modules. yet another part of #364
2013-05-26 21:55:00 -04:00
Marius Kintel
ce11fb2ea2
Fixed remaining issue. We now correctly detect removal of files as changes. Removed temporary debug output. Fixes #364
2013-05-26 15:08:23 -04:00
Marius Kintel
cc6ac10e47
Search paths when looking for previously missing includes. Should provide most of what's needed for #364
2013-05-25 17:45:13 -04:00
Don Bright
8a83e334ab
try to refactor the 'is_modified( includefile )' code
2013-05-19 23:31:18 -05:00
Don Bright
24e726fb58
first refactoring towards fixing issue364
2013-05-19 15:14:05 -05:00
Marius Kintel
ee6f149dd0
bugfix: Fixed recursion crash ( #346 )
2013-05-13 16:27:17 -04:00
Marius Kintel
14e1ad2363
Forgot to actually add most files in previous commit ( #217 )
2013-05-09 12:12:58 +02:00
Marius Kintel
ba20c0e800
Modified parse to allow overloading of variables in local blocks. Also did some minor cleanups while at it. Test cases missing
2013-04-26 18:32:19 -04:00
Marius Kintel
9b740b558d
Further refactoring of scope/context mechanisms. Mostly related to the new FileContext class. Not quite there yet, but almost
2013-04-26 17:45:03 -04:00
Marius Kintel
9a297ecee5
Refactoring: Split out FileModule from Module, Added LocalScope renamed some confusing 'evaluate' methods to 'instantiate', added FileContext (not yet used)
2013-04-26 17:45:03 -04:00
Marius Kintel
b4568a09df
Refactored assignments and assignments_var into one component
2013-04-26 17:43:40 -04:00
Marius Kintel
64ed1eb9fe
Experiment: Lazy evaluation of argument lists in evaluation context. Allows e.g. for loop variables to be dependent on each other
2013-04-26 17:42:32 -04:00
Marius Kintel
58bd9c9e3f
Cleaned up argument list handling, related to #116
2013-04-18 18:34:14 -04:00
Marius Kintel
151593705f
Disable context debug output
2013-04-09 01:04:36 -04:00
Marius Kintel
a37813a899
Refactored context handling into using separate Module contexts and Eval contexts. This allows for recursive module calls, and cascading children. I believe this fixes issue #116
2013-04-09 00:28:16 -04:00
Marius Kintel
1b8b7aa5fa
I think this should fix issue #217
2013-04-05 01:30:09 -04:00
Marius Kintel
40d9ffe6a4
Changed redeclaration of assignment so that the last declaration defines the order. This hopefully fixes the confusing error message discussed on the mailing list nov 27-30 (Variable bug)
2013-03-11 17:54:49 -04:00
Marius Kintel
502ecbb6ca
Block recursion on circular or recursive inclusions. Fixes #187
2012-09-02 13:17:14 -04:00
Marius Kintel
3019295737
Less debug output
2012-03-28 03:53:09 +02:00
Marius Kintel
2316127e62
Handle include dependencies
2012-02-17 23:05:36 +01:00