summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-02 19:37:55 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-03 12:32:59 +0300
commitd3439d0c6065bc60a9c4c915f4a1a3ffa796cf33 (patch)
tree0d6b55a7f6893a4d13616f72c310b4f6f532f0b0 /py/runtime.c
parent509c7a7854f24c202832d8fb1369130bf8908261 (diff)
downloadmicropython-d3439d0c6065bc60a9c4c915f4a1a3ffa796cf33.tar.gz
micropython-d3439d0c6065bc60a9c4c915f4a1a3ffa796cf33.zip
py: Instead of having "debug on" var, have "optimization level" var.
This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/runtime.c b/py/runtime.c
index ecaf40deb4..27a5ed5439 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -45,6 +45,7 @@
#include "bc.h"
#include "smallint.h"
#include "objgenerator.h"
+#include "lexer.h"
#if 0 // print debugging info
#define DEBUG_PRINT (1)
@@ -74,8 +75,8 @@ void mp_init(void) {
MICROPY_PORT_INIT_FUNC;
#endif
- // __debug__ enabled by default
- mp_set_debug(true);
+ // optimization disabled by default
+ mp_optimise_value = 0;
// init global module stuff
mp_module_init();