aboutsummaryrefslogtreecommitdiff
path: root/py/bc0.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-01 15:05:04 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-01 15:38:22 +0200
commit90750029df8d7fd24600cc4fe4c98a5b80731f28 (patch)
tree7e04bc8f0a079b79a7efcd634615ef3204f3f0ac /py/bc0.h
parent532f2c30f66c9ff1e4f2aded29b98ba0db5ec341 (diff)
Implement default function arguments (for Python functions).
TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
Diffstat (limited to 'py/bc0.h')
-rw-r--r--py/bc0.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/bc0.h b/py/bc0.h
index 569477ff4..7aab55561 100644
--- a/py/bc0.h
+++ b/py/bc0.h
@@ -94,7 +94,9 @@
#define MP_BC_CALL_METHOD_VAR (0x97) // uint
#define MP_BC_CALL_METHOD_KW (0x98) // uint
#define MP_BC_CALL_METHOD_VAR_KW (0x99) // uint
+#define MP_BC_MAKE_FUNCTION_DEFARGS (0x9a) // uint
#define MP_BC_IMPORT_NAME (0xe0) // qstr
#define MP_BC_IMPORT_FROM (0xe1) // qstr
#define MP_BC_IMPORT_STAR (0xe2)
+