Commit Graph

49 Commits (b567f844ad654f9b2a433e45ab00d48f4b1f950b)

Author SHA1 Message Date
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
Torsten Paul a820487032 Simple implementation of tail-recursion elimination. 2014-11-26 22:53:10 +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 f1b29e1db9 Removed old stack measurement code 2014-11-24 18:54:51 -05:00
Marius Kintel 54a111472f Initial experiment with using exceptions to handle stack overflows 2014-11-24 12:54:14 -05:00
Torsten Paul 609f665406 Extract PRINTB() from recursion stack. 2014-11-24 00:53:46 +01:00
Torsten Paul 1f73807097 Hack to track stack size in function evaluation. 2014-11-24 00:53:41 +01: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
Oskar Linde dd4e229a46 let()-expression: disable reassignments 2014-05-22 22:24:26 +02:00
Don Bright 9535627657 update documentation and add assertion check for Stack to destructor 2014-04-10 17:29:31 -05:00
Marius Kintel e30a40f432 minor cleanup of stack handling 2014-04-10 01:23:01 -04:00
Don Bright 0d950338e1 fix issue #694 2014-04-04 23:40:23 -05: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
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 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 73c2a45af6 Reinstate recursion guard to new context handling, fixes the last known subissue of #116 and #328 2013-04-15 20:58:15 -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 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 65fc1d6b01 Detect recursive execution of functions to avoid a stack overflow crash. Fixes #200 2012-10-09 23:32:56 -04:00
Marius Kintel 197a4e4d36 Merge branch 'master' into value 2012-06-04 11:34:27 +02:00
Marius Kintel 9698d1d2fb Don't prefix filenames which are already absolute with document path. Fixed #123 2012-06-04 11:23:37 +02:00
Marius Kintel 327310f190 Rewrote the Value class to be based on boost::variant - this should reduce memory footprint and improve performance 2012-03-28 00:05:58 +02:00
Marius Kintel b9d218e137 Initial implementation of ModuleCache and dependency tracking of used modules 2012-02-15 01:32:37 +01:00
Marius Kintel eff1f7f8c9 Ported printutils away from Qt 2012-01-25 03:11:12 +01:00
donb 65a1c9cf6c add boosty.h for compatability with boost <1.44 2012-01-14 05:02:15 +01:00
Marius Kintel 19ea0f0427 Don't use native() to extract strings from boost::filesystem::path() since that will use wchar under Windows 2012-01-09 03:06:44 +01:00
Marius Kintel cbabbaed70 Merge branch 'master' into boost_filesystem
Conflicts:
	openscad.pro
	src/module.h
2011-12-26 16:37:00 +01:00
Marius Kintel 4ff2d1af44 Some light refactoring attempts, didn't get very far.. 2011-12-26 16:34:47 +01:00
Marius Kintel d6efe5cbcb Merge branch 'master' into boost_filesystem
Conflicts:
	tests/CMakeLists.txt
2011-12-23 21:14:12 +01:00
Marius Kintel 1d2c59184c Changed the default value of to 2 to avoid breaking existing scripts which assume a certain default tesselation behavior 2011-12-19 16:55:01 +01:00
Marius Kintel ae30a79784 Ported from QFileInfo to boost::filesystem 2011-12-06 04:09:39 +01:00
Marius Kintel 45161d4356 Slight refactoring of builtin function and module handling 2011-11-06 18:37:12 +01:00
Marius Kintel 5466efe7ef bugfix: PI constant didn't work in cmd-line mode. refactored away duplicate code 2011-11-05 17:04:09 +01:00
Marius Kintel f40f7ef072 Added support for an untyped import() module, deprecating the explicitly typed import_*() ones 2011-09-07 00:47:55 +02:00
Marius Kintel 29adaed024 Deprecated dxf_linear_extrude(), dxf_rotate_extrude() and the file parameters to linear_extrude() and rotate_extrude() 2011-09-07 00:11:00 +02:00
Marius Kintel f58c0a3eb5 Some cleanup of the Context class 2011-09-03 18:51:29 +02:00
Marius Kintel 6f632190a0 Ported a bunch of stuff from Qt to STL 2011-09-03 06:10:36 +02:00
Marius Kintel d24b3cc84d Ported recent changes to master into the visitor branch 2011-04-12 20:35:44 +02:00
Giles Bathgate 744367fda1 Proof of concept implementation of builtin constants. 2011-02-05 16:37:30 +00:00
Marius Kintel 91c640fb5e Copyright updates 2011-01-21 02:21:09 +01:00
Marius Kintel 021edd8aa7 Ignore empty filenames when calculating absolute path 2010-10-31 02:42:36 +02:00
clifford d3329838b4 Clifford Wolf:
Implemented 'use' statement



git-svn-id: http://svn.clifford.at/openscad/trunk@459 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-28 13:48:04 +00:00
kintel f3d16e23b9 Multiple non-MDI assumptions were made, setting CWD and assuming it didn't change. Fix required to pass more context to nodes (functions). It's not totally clean, but it's a start. Fixes bugs: opening multiple files simultaneously only loaded the first file, refreshing an scad file referencing an external file failed if another scad file was opened in the meantime.
git-svn-id: http://svn.clifford.at/openscad/trunk@451 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-23 20:47:54 +00:00
kintel 754a8ee770 typo in warning message
git-svn-id: http://svn.clifford.at/openscad/trunk@429 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-10 13:13:10 +00:00
clifford 07bc7dbecd Clifford Wolf:
Added CGAL exception to all copyright notes, as it is suggested on:
	http://www.cgal.org/license.html
	http://www.fsf.org/licensing/licenses/index_html



git-svn-id: http://svn.clifford.at/openscad/trunk@405 b57f626f-c46c-0410-a088-ec61d464b74c
2010-02-01 09:34:18 +00:00
kintel 191dc4857c header file reorg
git-svn-id: http://svn.clifford.at/openscad/trunk@365 b57f626f-c46c-0410-a088-ec61d464b74c
2010-01-30 04:26:05 +00:00
kintel 6940d17181 reorganized file structure layout. more to follow...
git-svn-id: http://svn.clifford.at/openscad/trunk@364 b57f626f-c46c-0410-a088-ec61d464b74c
2010-01-30 04:17:05 +00:00